News for hackers. Stuff that matters.
Re:Rust: Dropping heavy things in another thread can make yo... by GuB-42 on Sunday May 31, 2020 @10:29PM (#23374995)
I don't know if Rust can do it (unsafe?) but in C and C++, I sometimes end up writing a custom allocator. It is often one of the most significant optimizations.

For example, I had the "million strings" problem once, literally millions. The solution was to put every string into a single large buffer and the pointers in another buffer. Not only I could deallocate everything at once but I also saved a bit of RAM by not aligning (not needed for strings).

There are no comments on this comment yet.