Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Right 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.



It'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.


I did this on my engine, 16000 squares running at 60fps on WebAssembly.

1 - https://github.com/khromatizo/squares/blob/main/scripts/main...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: