47 ms·
There is a lot of truth to this and you are one of the few people I've seen mention amdahl's law in the correct context. There are multiple malloc implementati
by CyberDildonics 6y ago
There is a lot of truth to this and you are one of the few people I've seen mention amdahl's law in the correct context.
There are multiple malloc implementations (gcc and maybe clang) that are supposedly multi-threaded now and multiple allocators are explicitly made for it like jemalloc, so I don't think the situation is quite as dire anymore.
That being said, I agree that using per-thread heaps is a much better structure by default for a heavily multi-threaded program since allocations crossing threads probably should be handled explicitly and memory mapping from the OS will still block (as far as I know).