Kind of a tangent, but does anyone know why glibc’s allocator loses to jemalloc on common workloads? I would expect that would be something worth rectifying unless other requirements tie their hands.
Quite a few complaints about jemalloc from Rust, where people wonder about higher than necessary memory usage
jemalloc likely wins more for the kinds of allocations you find in scripting language runtimes, which also happens to be similar to a browser given DOM & JS
> Kind of a tangent, but does anyone know why glibc’s allocator loses to jemalloc on common workloads?
Jemalloc implements more complex strategies (per-thread caches learned from tcmalloc, preallocated arenas, …).
It tends to have a somewhat higher memory use than simpler allocators, but have faster throughput and less fragmentation (the latter is why Firefox switched to jemalloc by default IIRC).
> I would expect that would be something worth rectifying unless other requirements tie their hands.
Why? If they consider ptmalloc good enough for their purpose, replacing it would be very low priority, and they may value e.g. code simplicity higher.