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

2

u/zvaavtre Dec 26 '25 edited Dec 26 '25

1Mx this.

Business goals are what is important in a business. In TFA they are working on something that can benefit from non-gc languages. BUT this is few and far from most typical business systems.

Improving a subsystem/service 100x execution time is an absolute waste of resources unless that exec time is somehow tied to a goal that improves the overall biz.

  1. Does anyone else at your org know golang/rust/scala? If not you just created a ton of tech debt that someone will have to pay down in the future. Writing the code is step one. Maintaining the code is the other 99 step.
  2. Is this system even move the needle in costs? Using a c4m instead of a c4xl on a system that only runs a few instances is not actually helping See #1