Re:C/C++ vs. Rust Performance
by jeff-davis on Monday November 02, 2020 @05:12PM
(#24974096)
What's difficult in Rust is:
(1) knowing how much memory a particular structure (like a hash table) is using
(2) managing that memory as a single chunk; e.g. to free the whole thing at once so that you can pick up another chunk that you had previously serialized
It's not impossible in rust, it's just that you have to build up all the pieces and none of it will integrate nicely with the rest of the rust code.
When I talk about organizing the data structure I'm talking about how the data is layed out in the memory map and how locality is affected.
What I'm saying is not that I think all uses are covered by memory mapping, just that data structure layout combined with memory mapping can probably take care of lots of the majority of scenarios.
I did not know that organizing memory layout was difficult in Rust since it is very straight forward in C++.