top | item 43542676

(no title)

pebal | 11 months ago

If you have a moving, generational GC, then all the benefits of fast allocation are lost due to data moving and costly memory barriers.

discuss

order

gf000|11 months ago

Not at all. Most objects die young and thus are never moved. Also, the time before it is moved is very long compared to CPU operations so it is only statistically relevant (very good throughput, rare, longer tail on latency graphs).

Also, write-only barriers don't have that big of an overhead.

pebal|11 months ago

It doesn't matter if objects die young — the other objects on the heap are still moved around periodically, which reduces performance. When you're using a moving GC, you also have additional read barriers that non-moving GCs don't require.

pgwhalen|11 months ago

It’s in uncharitable to say the benefits are lost - I’d reframe it as creating tradeoffs.