3 ms·
Is ES6 native much faster than transpiled?
by hoodoof 10y ago
Is ES6 native much faster than transpiled?
- connor4312 10y agoHere's a chart: https://kpdecker.github.io/six-speed/ https://kpdecker.github.io/six-speed/. Often the answer is "not yet". Transpilers convert the code to ES5, which has benefited from six years or optimization. New ES6 features will take some time to catch up.
- brokentone 10y agoFrom my limited anecdotal testing no. In fact it may be slower. This is a good view of this: https://kpdecker.github.io/six-speed/ https://kpdecker.github.io/six-speed/ However... the potential upside is size. Native code will usually be smaller, which for a web client is a win.
- antjanus 10y agoI'm having trouble reading the table, when it says 16x slower, is it saying the implementation is slower or the engine?
- jdcarr 10y agoYou might be missing the header row of the table listing various engines and their versions, and the little note that says "Performance of ES6 features relative to the ES5 baseline operations per second." And I would assume that the baseline has been established on a per-engine basis.
- cormacrelf 10y agoI remember having exactly this impression last time it popped up on HN. Bad design needs explaining.