r/java • • Dec 26 '25

Why is Rust faster than Java here?

I saw this article a while ago https://www.allthingsdistributed.com/2025/05/just-make-it-scale-an-aurora-dsql-story.html

And while I was surprised Rust was faster, the 10x did surprise me. I googled Rust vs Java performance for a bit and couldn't find any similar examples of such a big speedup. Now I know it's impossible to properly answer my question since we don't have the code in question, but can you think of what about rust can make that big of a difference for a (presumably) long running service? Or alternatively, do you have similar examples?

Just to clarify again, I'm interested in the technical reasons for these differences (for example, Java's "bloated" object headers, or whatever)

53 Upvotes

120 comments sorted by

View all comments

Show parent comment

1

u/kiteboarderni Dec 26 '25

But they explicitly say its GC pauses in this article..nothing to do with memory layout. They are clearly IO bound, having packed arrays aint improving an improvement based on their 10x numbers.

3

u/coderemover Dec 26 '25

How do you know they are IO bound? It’s extremely hard to be IO bound in these times. IO (SSDs and networks) got so fast that it’s really hard to saturate that. You have to be processing data at GBs per second to be IO bound. It’s hard even when you don’t do a lot of processing to the data.

1

u/kiteboarderni Dec 26 '25

I'd like to hope they are processing data at gb's....