Show HN: Faster.js – a micro-optimizing JavaScript compiler
1–10 of 37 posts
Re: Show HN: Faster.js – a micro-optimizing JavaScript compiler
#2Re: Show HN: Faster.js – a micro-optimizing JavaScript compiler
#3Re: Show HN: Faster.js – a micro-optimizing JavaScript compiler
#4Prepack, https://prepack.io , is also in the same realm of an optimizing Javascript compiler.
Re: Show HN: Faster.js – a micro-optimizing JavaScript compiler
#5Re: Show HN: Faster.js – a micro-optimizing JavaScript compiler
#6It's a fun project and might have application in specialized situations (and maybe for Node, where time spent in synchronous iteration blocks all other requests?). But I feel like this does more harm than good in most cases (larger bundle, extra build step, less readable output code can make debugging harder, etc)
Re: Show HN: Faster.js – a micro-optimizing JavaScript compiler
#7Prepack, https://prepack.io , is also in the same realm of an optimizing Javascript compiler.
Prepack is rather nice. It allows you to execute part of your code at compile time, like a macro.
function add5(x) {
return x + 5;
}
console.log(add5(3));
compiles down to console.log(8);Re: Show HN: Faster.js – a micro-optimizing JavaScript compiler
#8Re: Show HN: Faster.js – a micro-optimizing JavaScript compiler
#9On the demo page in Chrome, Faster.js is actually slower.
Re: Show HN: Faster.js – a micro-optimizing JavaScript compiler
#10These kind of optimizations were very useful in hot paths even just a few years ago. However browser engines have optimized functional patterns (what this mostly rewrites) to be within absolute microseconds of imperative versions.
In some cases it can even make useful assumptions in an FP method (immutability, etc) that it can't in the standard loops - which is why sometimes this is slower.
Long story short: concentrate on shipping less JavaScript and good practical solutions/algorithms and not stuff like this.