2 ms·
> Why would a GC remove allocations from the hot path? It wouldn't reduce allocation count, it would reduce allocation cost to a simple pointer bump which is v
by naasking 10y ago
> Why would a GC remove allocations from the hot path?
It wouldn't reduce allocation count, it would reduce allocation cost to a simple pointer bump which is virtually guaranteed to already be in cache (unlike malloc tables).
The added cost is only tracing, but if, like the OP said, allocations conform to the generational hypothesis, then frequent minor collections are quite fast.