Re: Grumpy NES emulator
Posted: Mon Dec 13, 2021 5:50 pm
Thanks, ivan.
I guess it's the way the code was written that makes the JIT go nuts, resulting in too many hot paths and with no trace abort ever happening.
Edit: if anyone has any insight into how to keep LuaJIT from specializing too much, I'm all ears. I never got any usable response to my questions on mailing lists and other channels.
The reason for the excessive garbage is not the usual suspects; it's very carefully written to avoid that. It's the sheer number of traces generated by the JIT compiler. The alloted space fills up very quickly, older traces get evicted all the time, which results in endless churn.
I guess it's the way the code was written that makes the JIT go nuts, resulting in too many hot paths and with no trace abort ever happening.
Edit: if anyone has any insight into how to keep LuaJIT from specializing too much, I'm all ears. I never got any usable response to my questions on mailing lists and other channels.