Is there a CPU that runs Java in microcode? [closed]

こ雲淡風輕ζ 提交于 2019-12-04 02:02:15

Sun designed the picoJava processor about 10 years ago, but it never went anywhere - there was no market for it at the time, and modern VMs render the concept pretty pointless.

Then there's the fledgling ARM Jazelle architecture.

The only reference I found so far to this conundrum is the following article:

http://www.theserverside.com/discussions/thread.tss?thread_id=59958

While I was initially interested in first knowing whether there are Java-CPU's and what they are, this thread sheds some light on why I haven't heard of any (until I read the learned replies here). The last comment, by Alex Besogonov, seems to be the best explanation:

Java bytecode is NOT suited to be run on real hardware. It's stack-based, so pipelining goes out of the window. In theory, one can do on-the-fly translation from stack-based to register-based machine, but it'll require A LOT of transistors.

So in reality, it's ALWAYS more effective to JIT-compile Java bytecode and then run it on a common CPU. There is one exception JVMs for low-power devices where the speed of hardware JVM is not a problem (remember Forth CPUs).

Of course, hardware can still provide few features to speed up JVMs. Like hardware-assisted forwarding pointers which allow to create fast real-time compacting pauseless GC (I assume Azul hardware has this support).

This is very interesting. Thank you all for your answers.

Azul Systems designs systems from the ground up with (massive services running on) Java in mind, including hardware-assisted garbage collection.

There's also GCJ for compiling Java to native code, though it is not a complete implementation of Java.

You might want to try JOP

It's open source and you can try it on your own hardware.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!