3 ms·
Any decent multithreaded allocator (like the one in glibc) is going to basically make those equivalent, and if the parallel version is 10x slower than the seque
by pcwalton 13y ago
Any decent multithreaded allocator (like the one in glibc) is going to basically make those equivalent, and if the parallel version is 10x slower than the sequential one then I suspect most of the overhead is in allocating stacks. You could try tcmalloc/jemalloc but I suspect you won't see huge gains—the overhead of allocation in general (cache pressure, etc.) seems to be swamping any gains.