4 ms·
There is a very big difference between what particular environments offer in theory (yes, you can write object pools in Java and many high-performance projects
by howinteresting 6y ago
There is a very big difference between what particular environments offer in theory (yes, you can write object pools in Java and many high-performance projects use them) and the situation in practice (there are people who spend a large chunk of their professional careers doing JVM tuning).
Idiomatic Rust avoids the situations which require JVM tuning experts. You can write a Rust service, put it into production and tail latency is very likely not going to be a problem at all.
Now you may decide that needing the occasional services of a JVM tuning expert is better overall than ownership concerns being pervasive throughout a codebase, depending on the specifics. But do accept that the trade-off exists.
- pjmlp 6y agoOnly when speaking about kernel code, drivers, and similar scenarios. You are the one focusing in Java, and in your answer proved exactly my point of knowing stacks superficially. Object pools aren't the only way to reduce memory footprint in Java. A bit of FFI into host OS syscalls and it is done, or a tiny high performance native library for a custom data structures and ready for the races. No need to throw away 25 years of tooling and libraries. Then we can move into languages that offer exactly the same features as C++, like D, Nim, Swift, Eiffel, Ada.
- howinteresting 6y agoI've written three of those sorts of native libraries before, and it's just awfully inconvenient compared to just using Rust to be honest.