logoalt Hacker News

versteegentoday at 9:01 AM1 replyview on HN

Yes, language design is a hugely important determinant of interpreter or JIT speed. There are many highly optimised VMs for dynamic languages but LuaJIT is king because Lua is such a small and suitable language, and although it does have a couple difficult to optimise features, they are few enough that you can expend the effort. It's nothing like Python. It's not much of an exaggeration to say Python is designed to minimise the possibility of a fast JIT, with compounding layers of dynamism. After years of work, the CPython 3.15 JIT finally managed ~5% faster than the stock interpreter on x86_64.


Replies

dontlaughtoday at 10:29 AM

Python is worse, but not by all that much. After all, PyPy has been several times faster for many years.