Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why would Lua be significantly faster than Python? Isn't it an interpreted language too?


The Lua interpreter is really lightweight, and for decades has been the go to choice for when you need dynamic code and speed (for example, it's been popular in the games industry for this reason).

Probably someone else can shed light on exact numbers, but Lua is faster than Python.


It's also very small. We used it extensively on embedded Linux devices in the 2000s for these reasons as well as easy interop with C/C++.


I'm still using Lua on embedded Linux devices, and in fact completed a project last year that was deemed impossible by the Java devs, but easily within our memory/time budget as a Lua group. The success of that embedded Lua project converted a large number of Java diehards into Lua accolytes...

Folks who sniff at putting a scripted/interpreted language into an embedded environment really need to think twice with Lua. It is fast, tight and highly performant - and if you bundle it along with LuaJIT and Turbo.lua, it'll give you the best of all worlds - aynsc i/o, coroutines, very, very fast performance and a great execution environment upon which to build truly useful apps.


The JIT version of LUA, according to some benchmarks I just saw, is similar to C in performance.




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

Search: