Hacker News new | comments | show | ask | jobs | submit login

> You can only asm.js'fy a normal Lua interpreter which is up to 64x slower than LuaJIT on benchmarks

Yes, LuaJIT is fast, but even their own numbers are nowhere near 64x being the mean or median,

http://luajit.org/performance_x86.html

Furthermore, these are microbenchmarks. Large codebases might paint a different picture.

I am also not sure why LuaJIT is the most interesting comparison. Yes, LuaJIT is a work of art, but even normal Lua is quite fast, beating Python and Ruby easily. So even a half-speed Lua-VM-in-JS would be competitive with other dynamic languages - which means it is fast enough for many uses.

Finally, we can certainly compile VMs that JIT, we just need to create JIT backends for them that emit JS (preferably asm.js). But LuaJIT is more tricky, as you note, because it lacks a portable C interpreter.




Applications are open for YC Winter 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: