Re:Rust Is the Future of JavaScript Infrastructure
by Thaxll on Thursday November 11, 2021 @05:56PM
(#29194321)
When you work at certain scale with C++ and Rust you ends rewriting a GC inside those language because default allocator are not good enough. That's why GC languages are faster than C++/Rust in some scenarios.
[ Parent
| on HN ]
Re:Rust Is the Future of JavaScript Infrastructure
by obviouslynotme on Thursday November 11, 2021 @06:59PM
(#29194824)
>Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
- Greenspun's tenth rule
Joking aside, Java VM can be as fast as C++, not C, by using profiling and JIT optimization if tuned to a specific server and only measuring after running for a while. If you are really thinking about your allocators and not just calling malloc, nothing is faster. Half of this is due to less allocator calls and half is due to laying out the memory in a cache-friendly manner.