3 ms·
I think GLIBC 2.26 added a per-thread cache, so it might no longer be that slow when compared to jemalloc.
by GrayShade 9y ago
I think GLIBC 2.26 added a per-thread cache, so it might no longer be that slow when compared to jemalloc.
- kibwen 9y agoI'm under the impression that what also makes jemalloc fast is that it has a richer API than glibc malloc (in a way that isn't drop-in compatible, so libc-compatible malloc can't ever provide it), thereby giving it more info that it can use for optimization (but also stymying tools like valgrind).
- GrayShade 9y agoThat's sized deallocation, right? Unfortunately, GLIBC doesn't seem to provide it.