Remix.run Logo
Panzer04 6 days ago

That seems like a huge burden, surely not? How often would a GC typically check for hanging references?

yvdriess 6 days ago | parent [-]

That's most of the work performed by a marking GC.

How much a GC is of total cpu cost totally depends on the application, the GC implementation and the language. It's famously hard to measure what the memory management overhead is, GC in production is anywhere between 7-82% (Cai ISPASS2022). I measured about 19% geomean overhead in accurate simulation by ignoring instructions involved in GC/MM in python's pyperf benchmarks.