repl.it contains code from a few years ago. That's way before a huge amount of general optimizations in emscripten, as well as asm.js. Here is a more up to date Lua VM running in JS:
But even that is already out of date ;) just this week I found that I was building Lua with a bad choice of optimization flags. We include Lua VM benchmarks in the emscripten test suite, so for the latest numbers (with the proper optimization flags), see
Take this naive fibonacci function: function fib(n) return n<2 and n or fib(n-1)+fib(n-2) end print(fib(30))
On my machine, it completes in less than a second on PNaCl, but takes nearly 10 seconds to complete in emscripten.