Comment

Comment by Silhouette

Thanks for sharing the benchmarks.

I'm not sure how 6to5, or any other transpiler, could do much better. The job these tools exist to do necessarily means they can't do better than what today's browsers' JS engines will support.

Presumably in due course browsers will provide ES6 natively and so be better able to optimise code that uses tail calls in this way. Still, it's important to realise that the 6to5 implementation is much slower, and more of a forward-compatible stepping stone if you need it than something to use routinely if you like a functional programming style.

parent Silhouette 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton