A variation on D4758 which preserves animation frame rate by running GC slice between frames. Also differs in that no minimum time is enforced below 50% pressure.
This version should be used with the current thread architecture and D4758 should be used for a future version which runs simulation in a separate thread.
This is the same commands-1 from D4758. I profiled it again even though the performance shouldn't change in headless mode because I upgraded from gcc7 to gcc11.
12.5% total difference
commands-2 and commands-3 I generated fresh rather then reusing the ones from D4758.
16.3%
14.6%