Previously we were computing whether garbage collection should occur on the hot path, which is not terribly efficient. We now compute this information in a more efficient way and only during slow allocations, leaving the fast path to only load a boolean global variable.
I did some profiling and this doesn't seem to have much impact on total memory usage, nor does it cause significantly more time spent in garbage collection.
Previously we were computing whether garbage collection should occur on the hot path, which is not terribly efficient. We now compute this information in a more efficient way and only during slow allocations, leaving the fast path to only load a boolean global variable.
I did some profiling and this doesn't seem to have much impact on total memory usage, nor does it cause significantly more time spent in garbage collection.