←back to thread

56 points mghackerlady | 1 comments | | HN request time: 0.212s | source
Show context
codeflo ◴[] No.45990893[source]
It's easily imaginable that there are new CPU features that would help with building an efficient Java VM, if that's the CPU's primary purpose. Just from the top of my head, one might want a form of finer-grainer memory virtualization that could enable very cheap concurrent garbage collection.

But having Java bytecode as the actual instruction set architecture doesn't sound too useful. It's true that any modern processor has a "compilation step" into microcode anyway, so in an abstract sense, that might as well be some kind of bytecode. But given the high-level nature of Java's bytecode instructions in particular, there are certainly some optimizations that are easy to do in a software JIT, and that just aren't practical to do in hardware during instruction decode.

What I can imagine is a purpose-built CPU that would make the JIT's job a lot easier and faster than compiling for x86 or ARM. Such a machine wouldn't execute raw Java bytecode, rather, something a tiny bit more low-level.

replies(4): >>45991683 #>>45991954 #>>45991995 #>>45992555 #
1. mghackerlady ◴[] No.45992555[source]
I know it prolly isn't the most practical, but neither were lisp machines and we still love them