News for hackers. Stuff that matters.
Re:Speed of Rust vs. C by fulafel on Saturday March 13, 2021 @04:13AM (#26445212)
That's what happens by using normal malloc/free anyway, no? Implementations of malloc have a strong performance incentive to allocate from the cache hot most recently freed blocks.
Re:Speed of Rust vs. C by ric129 on Saturday March 13, 2021 @11:19AM (#26447536)
Yes, all allocators (except perhaps OpenBSDs from what I see in this thread) do this. It is also why `calloc` exists - because zero-initializing every single allocation is really, really expensive.