Re:Ask HN: If you targetting ES6 by default, how did you rat...
by juandopazo on Thursday December 22, 2016 @01:19PM
(#13239165)
> If you're running code on the server, there's no reason to compile down to ES5
Actually, ES6 is not running at full speed in Node yet. So there are still some performance benefits on transpiling.
Re:Ask HN: If you targetting ES6 by default, how did you rat...
by iends on Thursday December 22, 2016 @01:27PM
(#13239226)
The runtime performance lost using ES6 features is minuscule compared to the runtime performance lost by using Node.js in the first place. If the difference in performance for the ES6 features actually matters then you have made a grave mistake using Node in the first place.
Re:Ask HN: If you targetting ES6 by default, how did you rat...
by spinlock on Thursday December 22, 2016 @01:31PM
(#13239260)
Are you comparing node to C or Go or something else?
It's funny, my big a-ha moment on performance happened when I was working at a bank and could only code in vba (i.e. excel). All of a sudden -- even on small data sets -- O(n^2) was unacceptable and I needed to think about algorithms to get to O(nlgn).
I think it all depends on your context and use case. If you're running code on the server, there's no reason to compile down to ES5 if you know that your node version can run your code without modification. At my company, we write browser-based tools for scientists, so we have a bit more flexibility in asking users to use modern browsers. We still use babel and target ES5, but we may move off of it before normal consumer websites do.