4 ms·
I suspect that this is not using stock Lua, but LuaJIT instead. Stock Lua wouldn't be much different than Python itself. The real gains come from Mike Pall's a
by kayamon 10y ago
I suspect that this is not using stock Lua, but LuaJIT instead. Stock Lua wouldn't be much different than Python itself.
The real gains come from Mike Pall's amazing JIT implementation, not the language itself.
- coldtea 10y ago>Stock Lua wouldn't be much different than Python itself. Stock Lua is also much faster than Python.
- rudolf0 10y agoBut LuaJIT is (usually) much faster than the standard Lua interpreter.
- aargh_aargh 10y ago"Lupa is a very fast and thin wrapper around Lua or LuaJIT." "It complements Python very well. Lua is a language as dynamic as Python, but LuaJIT compiles it to very fast machine code, sometimes faster than many statically compiled languages for computational code. The language runtime is very small and carefully designed for embedding. The complete binary module of Lupa, including a statically linked LuaJIT2 runtime, only weighs some 700KB on a 64 bit machine. With standard Lua 5.1, it’s less than 400KB." https://pypi.python.org/pypi/lupa https://pypi.python.org/pypi/lupa
- dx034 10y agoWhich leads to the question why there is no proper JIT implementation of Python. It's so widely used that you would expect someone coming up with one eventually. Or are language features so different that they don't allow an implementation similar to LuaJIT or Julia?
- Vaskivo 10y agoPython is much more complex than Lua. In fact, one of Lua's greatest features is it's extreme and elegant simplicity. I believe it is a lot harder to make a Python jitter. And it would never be as fast as a Lua jitter.
- joobus 10y agoThere is a JIT for python: http://pypy.org/ http://pypy.org/
- niftich 10y agoAnd although the article doesn't state that PyPy is a JIT, it's one of the implementations that the author tries to obtain a speedup.
- RubyPinch 10y agoCPython 3.6 has a frame evaluation api, specifically for JIT integration Pyston is the only CPython JIT currently however