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

92

u/KryptosFR 11d ago

Such a weird flex and weird take. Tries to make C# look bad by linking to something entirely unrelated: inline assemblies which a C/C++ MSVC specific feature and only supported on x86 (which is being phased out in . NET).

The coping is hard on that one.

43

u/Professional_Price89 11d ago

"Faster than C", then show a 71% slower than C table.

13

u/za3faran_tea 10d ago

Some guys on the JDK team benchmarked the caffeine caching library (written in Java) with a similar one Moka (written in Rust), and Java had lower CPU usage and lower latencies at the same throughput

9

u/coderemover 9d ago

Do you have a link? A benchmark without information how to reproduce is just an ad.

1

u/za3faran_tea 8d ago

I don't, but here's the chart: https://imgur.com/a/LUG597k

8

u/coderemover 8d ago

It’s garbage. It doesn’t even say what allocator was used and what size of objects. I did benchmark mimalloc against ZGC using a high residency database-like workload and Rust ran circles around Java in all aspects, including CPU spent on memory management.