3 ms·
Javascript doesn't have the same type information as WASM, also it lacks a native 64-bit integer. The JIT can do some type inference to use integers internally
by crocodileJS 10y ago
Javascript doesn't have the same type information as WASM, also it lacks a native 64-bit integer. The JIT can do some type inference to use integers internally in some cases, but it's not optimal.
Predicting what sort of Javascript turns into what kind of native code on different JIT implementations is far from simple, too.
Even if in theory, an equivalent result should be possible in some cases, it's unrealistic to expect that in practice.