3 ms·
GC is not a problem for CPU intense applications. The fundamental problem with a GC is that all threads must be stopped to perform the garbage collection. GC
by imtringued 9y ago
GC is not a problem for CPU intense applications.
The fundamental problem with a GC is that all threads must be stopped to perform the garbage collection.
GC pauses are a problem for realtime applications because an unpredictable GC pauses can blow your time budget of 16ms (or even less) per "tick". The only way to avoid this is by not allocating anything during the realtime segments. Since the GC "infects" your entire program you are also not allowed to allocate anything during the non realtime segments. So you might as well just write C++ code.
If the heap is large enough (several dozen gigabytes) the GC pauses may cause latency spikes that last more than a second.