4 ms·
> Today the libc allocators have advanced by maybe tens of thousands of PhDs worth of theory and practice. For fun I wrote up a very basic memory manager and b
by legohead 2y ago
> Today the libc allocators have advanced by maybe tens of thousands of PhDs worth of theory and practice.
For fun I wrote up a very basic memory manager and benchmarked it against free/malloc. On my Mac (M3) the manager was 3x faster. On a random kubernetes pod (alpine) it was 33x faster. Performance increases as memory size goes up.
- throwaway2037 2y agoIf this is true, can some of your ideas be integrated into the standard libc allocator?
- GabrielTFS 2y agoWell, not on MacOS, I imagine (you tell me which repository/mailing list they should send a PR to :p). Really Windows and MacOS seem like the places where a malloc replacement is generally quite useful (Windows is a particularly big offender in this regard, Windows malloc is abysmal - MacOS less so iirc but still pretty bad) - it's glibc that's somewhat of an outlier by being generally pretty good.