4 ms·
>GC can cause really bad hick-ups What version were you using? Recent Lua versions have a smoother GC overall
by PhilipRoman 2y ago
>GC can cause really bad hick-ups
What version were you using? Recent Lua versions have a smoother GC overall
- samiv 2y agoRight now on Lua 5.4.2 I've had some success by tuning the GC with `collectgarbage('setpause', 100)` and then manually calling ` collectgarbage('step')`every once in a while. That being said this problem isn't unique to Lua, There are horror stories about Unity and their integration of C# for example.
- mococa 2y agoI did this on my engine, 16000 squares running at 60fps on WebAssembly. 1 - https://github.com/khromatizo/squares/blob/main/scripts/main.lua https://github.com/khromatizo/squares/blob/main/scripts/main...
- Rohansi 2y agoIt's especially bad in Unity because it's using the Boehm garbage collector. C# everywhere else has a performant generational GC. Unity have been working on this problem for years now trying to get the engine to work with .NET (Core) and it's better GC.