r/ProgrammerHumor • • May 29 '20

Please Guys actually

Post image
3.0k Upvotes

112 comments sorted by

View all comments

Show parent comment

1

u/Bounty1Berry May 30 '20

I'm curious how a compiles-to-bare-metal Java would have fared against the JVM model.

It might be fast enough now, but remember that in the early years of Java, a 200MHz Pentium or K6 was not an unreasonable target system.

7

u/_meegoo_ May 30 '20

Java that compiles to machine code would just be another C. With pretty much the same performance.

But either way, modern Java does compile to machine code. Except it does it at runtime, not at compile time.

2

u/[deleted] May 30 '20

I'm curious how a compiles-to-bare-metal Java would have fared against the JVM model.

Java already compiles to machine code through JIT. In benchmarks, even C,C++,Rust have to use AVX intrinsics directly to be in any significant way faster than Java.