2 ms·
Allocation with a modern GC is just a single subtraction in most cases: it's very fast. Deallocation is obviously a lot more involved, but it can be done in pa
by zigzigzag 10y ago
Allocation with a modern GC is just a single subtraction in most cases: it's very fast.
Deallocation is obviously a lot more involved, but it can be done in parallel on cores that may sit around not always fully utilised.
Compilers can normally max out all the cores you've got during a full build, so perhaps in this case it doesn't matter: enhancing the parallelism doesn't help you. On the other hand if you're rebuilding a single file due to incremental compilation, it's probably hard to parallelise that entirely by hand, so shoving some of the memory management work onto your spare cores can help.