https://babeljs.io/repl/#?experimental=true&evaluate=true&lo...
I didn't test the performance impact though. Also it's still a mystery to me how to enable Loose mode in Babel 6.
I guess your application: - doesn't intensely manipulate the DOM (otherwise your js performance shouldn't really be the bottleneck). - isn't easy to parallelize. - or you already make massive usage of web workers and you still had issues.
No sarcasm at all, I've recently refactored in ES6 the code-base I'm working on, without noticing any performance issues, and we really gained in readability and maintainability doing so. That's why I really wonder what could lead me to do the exact opposite.
So far the only features that are actually fast are generators and the new data types (Map, Set, et al).
[1] https://jsperf.com/for-vs-for-of/2
[2] https://developer.mozilla.org/en/docs/Web/JavaScript/Referen...
For example, `class` has particularly bad performance characteristics because under the hood it has to set an object's prototype on the fly (at least this is how Babel implements it) [1] and `super` is also slow due to prototype lookup [2].
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
[2] https://jsperf.com/es6-classes-super-es5-vs-transpiled/2