3 ms·
Not unless the compiler did some magic to remove the heap allocations, which iirc none of the JS engines do yet LuaJIT, however, will. see http://wiki.luajit.or
by yoklov 13y ago
Not unless the compiler did some magic to remove the heap allocations, which iirc none of the JS engines do yet LuaJIT, however, will. see http://wiki.luajit.org/Allocation-Sinking-Optimization http://wiki.luajit.org/Allocation-Sinking-Optimization . I believe the Dart VM does this too, so it might not be far off for JS engines.
Still, other semantics might slow the code down compared to ASM.js, but the heap allocations will be the biggest.