Re:Show HN: Faster.js – a micro-optimizing JavaScript compiler
by leeoniya on Friday April 20, 2018 @02:01PM
(#16887016)
Closure compiler in ADVANCED_OPTIMIZATIONS mode does this too.
compiles down to
[ Parent
| on HN ]
Re:Show HN: Faster.js – a micro-optimizing JavaScript compiler
by danabramov on Friday April 20, 2018 @04:13PM
(#16888124)
Prepack is doing much more than GCC can because it effectively evaluates the whole code and then serialises its heap. This is both its biggest strength and weakness.
Unlike GCC, it can unroll any kind of metaprogramming, but it needs to have a model of the environment (e.g. it won’t execute code relying on DOM) and it can produce larger code (in terms of absolute size).
Re:Show HN: Faster.js – a micro-optimizing JavaScript compiler
by yoklov on Saturday April 21, 2018 @01:33AM
(#16890130)
I would avoid using the name GCC to refer to the closure compiler, since there's already an extremely well-known compiler named GCC.
Admittedly it doesn't take JS as input, but I was somewhat confused when I read your comment nonetheless.