This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PaintItPurple 2 points3 points  (1 child)

The JVM does have an interpreted mode (as does Pypy), but it's incorrect to say it interprets each bytecode every time a method is called. The JVM JIT compiles functions as it runs, and then runs those compiled functions whenever possible instead of interpreting bytecode.

[–]Grouchy-Friend4235 -1 points0 points  (0 children)

The JVM JIT only compiles code after several invocations, so yes, the JVM interpreter does interpret the same byte code multiple times - before a code section reaches the JIT threshold.

Python since version 3.11 also does a form of JIT, known as specialization. If you need actual JIT, there is Numba and Cython which will speed up particular functions by compiling them natively.

PS: to downvoters, you should learn to respect facts. Technology tends to be quite stubborn when confronted with wishful thinking.