Re:Leveraging Rust in our high-performance Java database
by Groxx on Wednesday September 20, 2023 @12:38PM
(#37586379)
In many cases, because it defeats generational collection. It pushes everything into longer generations because they hang around longer.
Doing more young generation collection is sometimes cheaper in aggregate (more frequent but far smaller and usually more efficient) than adding more data to the older generations (less frequent and more costly, longer pauses, etc especially if it's rapidly modified).
But as doctorpangloss said: so many caveats. There's ample evidence that it is both better and worse, it depends on lots of details.
The main thing you can confidently claim is that it is not the majority of code, so most language optimizations will choose to improve straightforward and common stuff at the cost of this niche. Not always, but there is definitely more energy in improving the 90%+ cases and that adds up over time.
Doing more young generation collection is sometimes cheaper in aggregate (more frequent but far smaller and usually more efficient) than adding more data to the older generations (less frequent and more costly, longer pauses, etc especially if it's rapidly modified).
But as doctorpangloss said: so many caveats. There's ample evidence that it is both better and worse, it depends on lots of details.
The main thing you can confidently claim is that it is not the majority of code, so most language optimizations will choose to improve straightforward and common stuff at the cost of this niche. Not always, but there is definitely more energy in improving the 90%+ cases and that adds up over time.