3 ms·
There is a performance upper bound. You can only run instructions as fast as the machine can. Native code can get very close to this limit, in a way that in pra
by sqeaky 9y ago
There is a performance upper bound. You can only run instructions as fast as the machine can. Native code can get very close to this limit, in a way that in practice no interpreted or JITed code can. This is just emulating the techniques native code uses to get close to that upper bound in the same way.
It is not impossible to make pure JS run this fast, but its not going to happen without herculean effort put into JS runtimes. It is just easier to do it this way, and we get to leave JS, which is a benefit to everyone except people who actually like JS.