2 ms·
Not to take away from anything you've said, but in some scenarios, GCs have a lower impact on performance than dynamic allocation (well, if you use dynamic allo
by pron 12y ago
Not to take away from anything you've said, but in some scenarios, GCs have a lower impact on performance than dynamic allocation (well, if you use dynamic allocation). For one, they provide better throughput -- their overhead is mostly much higher memory usage, and latency (occasional pauses, although "pauseless" collectors -- actually, short pauses of a few milliseconds -- are used in the industry). But their more interesting advantage is in concurrent data structures. Many lock-free data structures (actually, most of the interesting ones) require a GC, or techniques that are less performant, less general, or both, like hazard pointers and user-space RCU.