Hacker News new | past | comments | ask | show | jobs | submit login

I'm curious what they do to the garbage collector; over the last few years we've made quite a few optimizations to our Lua 5.1 codebase to reduce the impact it has and yet just last week I was in there again squeezing blood from that stone.



What problems have you had with the garbage collector? Excessive pauses? Insufficient throughput?

Many other game-focused scripting languages use reference counting instead of tracing GC to eliminate pauses at the expense of throughput. Would that help in your situation?


We use a hybrid of ref-counting for many things but Lua still needs to do sweep phases in its GC that cannot be amortized across multiple frames. While we do most of Lua's GC asynchronously some of the phases take so long that they can stall the main thread that wants to execute some bytecode.

Here's an older tweet with some examples (I'm not the one tweeting but I made the optimizations):

https://twitter.com/sj_sinclair/status/1097920762147733506




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: