Hacker News new | ask | show | jobs
by kaba0 1634 days ago
> By bringing stuff once a while into cache they also push stuff that's actively used out of cache.

I may very well be wrong, but I don’t think it is any worse than the occasional OS scheduling/syscall, etc. GCs happen very rarely (unless of course someone trashes the GC by allocating in hot loops)

Also, while a destructor is indeed O(n) it is a cost that has to be paid on the given thread, while GCs can amortize it to a separate thread.