4 ms·
This is an important distinction, and as far as I know, none of the new features are very optimized. If you really want to write performant JS without a build s
by taternuts 10y ago
This is an important distinction, and as far as I know, none of the new features are very optimized. If you really want to write performant JS without a build step, you basically have to write it ES3-5 style, use for loops over maps and foreaches, etc
- bzbarsky 10y ago> none of the new features are very optimized I think for-of is getting pretty good. It's a bit of a pain to optimize because the iteration protocol in ES6 is designed in such a way that you have to do heroics (scalar replacement) to have any hope of optimizing it well. But engines are getting there.