r/programming • • 4d ago

Java4Shell is a reason to use Java

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

50 comments sorted by

View all comments

Show parent comment

11

u/za3faran_tea 3d 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

7

u/coderemover 2d ago

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

1

u/za3faran_tea 2d ago

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

4

u/coderemover 2d 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.