3 ms·
A 1,500 line switch statement that powers your Python
- sillycross 5y agoLuaJIT's interpreter loop is similar, except that it's written in assembly, and the motivation is that the compiler could not optimize the C version to the best possible extent. Kind of related, this post [1] mentioned some ideas to break it down into smaller modules without losing performance with tail calls. [1] https://blog.reverberate.org/2021/04/21/musttail-efficient-interpreters.html https://blog.reverberate.org/2021/04/21/musttail-efficient-i...