3 ms·
> If using a GC we know when they will occur, but do not know when they will be freed. Which means that at some indeterminate point in the future there will be
by titzer 10y ago
> If using a GC we know when they will occur, but do not know when they will be freed. Which means that at some indeterminate point in the future there will be a large temporary slowdown due to processing the GC.
This just isn't true anymore. Incremental collectors can achieve pause times in the single-digit millisecond range, and concurrent collectors can achieve pause times in the single-digit to tens of microseconds range, even for super-high-allocation rate programs. There are even real-time collectors suitable for audio and other hard real-time applications.
Azul GC (a high performance concurrent compacting collector): https://www.azul.com/products/zing/pgc/ https://www.azul.com/products/zing/pgc/
Metronome (a real-time GC with guaranteed maximum pause times): http://researcher.watson.ibm.com/researcher/view_group_subpage.php?id=175 http://researcher.watson.ibm.com/researcher/view_group_subpa...
GC scheduling in V8 (hides GC pause times between frames, reducing animation jank): http://queue.acm.org/detail.cfm?id=2977741 http://queue.acm.org/detail.cfm?id=2977741
The Go GC ships now with a very low-latency GC: https://blog.golang.org/go15gc https://blog.golang.org/go15gc
- paulsutter 10y ago> This just isn't true anymore. Incremental collectors can achieve pause times in the single-digit millisecond range Single digit milliseconds is millions of instructions, which /is/ a large slowdown in some applications.
- titzer 10y agoHow much do you think a page fault costs?
- paulsutter 10y agoPage faults cost zero. On locked pages.
- titzer 10y agoAgain downvotes. It'd be nice if people actually replied instead of downvoting.
- daemin 10y agoA millisecond is a huge amount of time, and in that time we can do so many more things more useful to the application than just collecting its trash.