Hacker News new | ask | show | jobs
by Zacru 1948 days ago
Out of curiosity, was that with closure's simple or advanced optimizations?
1 comments

Simple optimizations, Advanced always broke my code.
Important distinctions when comparing Closure Compiler's performance to other tools:

1. Regarding bundle size: Optimization level used (SIMPLE optimizations yield output that is at least expected from a minifier these days)

2. Regarding compilation speed:

* Whether the JavaScript-only compiler was used over the JVM compiler: besides being slower, a number of optimizations are not available to the former.

* In many conditions a pre-heated JVM (or Nailgun), or using the NPM-distributed native compiler binary yields faster compilation.

* Which compiler flags have been tuned; e.g. such that the parsing of browser externs is bypassed during compilation for Node.js-targeted bundles.

Relevant discussion: https://github.com/evanw/esbuild/issues/425