Commit before trying IntMap instead of vector for incidence graph

This commit is contained in:
2025-10-26 08:31:54 +00:00
parent 61910785c4
commit b8536e2929
7 changed files with 369291 additions and 187170 deletions
+2 -1
View File
@@ -76,7 +76,8 @@ doLoop spf window worldSideEffects eventFn startWorld = do
maybeUpdatedWorld <- pollEvents >>= foldM (applyEventIO eventFn) (Just worldAfterSimStep)
case maybeUpdatedWorld of
Just updatedWorld -> do
performGC
performGC -- potentially use performMinorGC
-- https://stackoverflow.com/questions/30244139/how-to-keep-very-big-elements-on-memory-without-exhausting-the-garbage-collector
endTicks <- ticks -- it might be better to use System.Clock (monotonic)
let theDelay = max 0 (spf + fromIntegral startTicks - fromIntegral endTicks)
threadDelay (theDelay * 1000)