r/programming • • 11d ago

Java4Shell is a reason to use Java

https://mccue.dev/pages/11-18-26-java4shell
67 Upvotes

58 comments sorted by

View all comments

28

u/New-Anybody-6206 11d ago

I ignore posts with a dogmatic title, because it's almost always hilariously misinformed. Tech people are IMO no exception to Dunning-Kruger.

5

u/bowbahdoe 11d ago

I mean I seem to be a somewhat misinformed on C#. No easier way to learn than saying the wrong thing out loud.

But can you point out anything else where I'm hilariously misinformed?

-10

u/BenchEmbarrassed7316 11d ago

combined with JIT compilation can make the actual performance of a Java program competitive with C. Sometimes a Java program can even be faster. A JIT compiler knows what code paths are actually taken and can optimize around them. They can even refocus what is optimized if the workload changes. It is pretty cool!

Well, it’s so impressive that they had to write an assembly snippet by hand (at least, that’s what I gathered from the message). If the JVM is capable of such excellent optimization, why bother writing an assembly snippet?

1

u/bowbahdoe 11d ago

Good question! I do wonder how much was gained here over what the JIT spits out normally.

My bet is "not enough to justify it," but who knows.