4 ms·
Runtimes with garbage collectors typically optimize for allocation, not deletion.
by tybit 2y ago
Runtimes with garbage collectors typically optimize for allocation, not deletion.
- mike_hearn 2y agoGenerational GC optimizes for both. They assume that most objects die young, so choose to relocate live objects and just mark the entire region that was evacuated as empty. So this is a very efficient way to delete data.