lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Tue, 5 Nov. 2019, 14:36 Coda Highland, <chighland@gmail.com> wrote:
A Lua-to-JS transpiler would almost certainly outperform Lua's C implementation at runtime, if the only metric you cared about was the speed of pure Lua code execution. An implementation of Lua in _javascript_ may or may not end up outperforming the C implementation depending on how it's done and how the JIT decides to approach it. (PROBABLY not, but I've seen some impressive stuff before -- it's possible that a sufficiently clever implementation might be able to pull it off.)

As the author of a couple of Lua in JS projects, they're all still slower than the Lua C interpreter, despite the best JS engines around.
For the right synthetic benchmark, fengari is "only" 3x slower than PUC Rio 5.3.