2 ms·
In the linked article by the OP Java is faster than Rust in every scenarios. https://www.techempower.com/benchmarks/#section=data-r15&hw=ph&test=json https://w
by Thaxll 9y ago
In the linked article by the OP Java is faster than Rust in every scenarios.
https://www.techempower.com/benchmarks/#section=data-r15&hw=ph&test=json https://www.techempower.com/benchmarks/#section=data-r15&hw=...
tbh benchmarks are not that useful, but it shows that GC languages are very fast in the web space and it's even more true when you add client -> server latency in the mix.
- staticassertion 9y agoNot in Plaintext. But yes, Java has some extremely optimized libraries for HTTP, and a great GC has a lot of advantages for this sort of benchmark I'd imagine (short lived allocations, deferred collections). That said, actix is particularly new, with room to optimize.
- seanmcdirmid 9y agoPeople often forget about the perf benefits of GC, focusing only on the overhead of collection. Still, you might be able to win in rust by using something like arenas when possible (though the type state system might not help in that case).
- steveklabnik 9y agoRust hasn't had typestate in something like four years now. Arenas and lifetimes work well together; the compiler actually has a hierarchy of arenas inside of it, and makes sure thanks to lifetimes that once the shorter-lived ones are freed, they don't get used again, for example.
- vardump 9y agoThe benchmark you linked has also latency tab. Try to press it. Looks like Rust libraries deliver very good latency with low jitter.
- swsieber 9y agoHeh, I bet rust also wins on memory usage by a land-slide.