3 ms·
JavaScript is a slightly different situation. The degree of "sufficiently smart compiler" required to get C to run at assembly speed/power is nearly trivial (st
by Rusky 13y ago
JavaScript is a slightly different situation. The degree of "sufficiently smart compiler" required to get C to run at assembly speed/power is nearly trivial (strength reducing multiply to shift? really not hard). On the other hand, the degree of "sufficiently smart compiler" required to map JS's type system and execution model to the machine is much higher and in some cases is impossible, which is why we have to use lots of JIT tricks (which takes power and time) just to get a mature, native-optimized JS program to run at half native speed at who-knows-what power.