runtimeverification / llvm-backend

KORE to llvm translation
BSD 3-Clause "New" or "Revised" License
36 stars 23 forks source link

optimize how we check whether gc should happen #1146

Closed dwightguth closed 2 months ago

dwightguth commented 2 months ago

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.