3 ms·
> I'm not sure what the bookkeeping overhead is for tracing GCs, but I'm guessing it's not O(N)? I don't know about these days but, historically, the received
by ssokolow 5y ago
> I'm not sure what the bookkeeping overhead is for tracing GCs, but I'm guessing it's not O(N)?
I don't know about these days but, historically, the received wisdom was "Take the memory your algorithm should need and double it, to leave room for floating garbage and bookkeeping overhead. Otherwise, your performance will suffer as the GC is forced to run more frequently than is ideal."
("Floating garbage" being the jargon for stuff that's inaccessible but not yet collected.)