fyi, i benchmarked minification-performance of google-closure-compiler and terser against a "classic" es5-compiler (uglifyjs-lite). google-closure-compiler is comparable to es5-compiler (but slow to compile), while terser is significantly worse:
minifiying jquery-v3.3.1.js uminified: 271,751 bytes (100.0%) terser (es6): 137,538 bytes ( 50.6%) google-closure-compiler (es6): 89,845 bytes ( 33.1%) uglifyjs-lite (es5): 88,681 bytes ( 32.6%) $ $ npm install google-closure-compiler terser uglifyjs-lite $ curl -s -O https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.js $ ./node_modules/.bin/google-closure-compiler jquery.js > jquery.min.google-closure-compiler.js 2>/dev/null $ ./node_modules/.bin/terser jquery.js > jquery.min.terser.js 2>/dev/null $ ./node_modules/.bin/uglifyjs-lite jquery.js > jquery.min.uglifyjs-lite.js 2>/dev/null $ ls -lS total 1184 -rw-r--r-- 1 kaizhu wheel 271751 Feb 12 23:40 jquery.js -rw-r--r-- 1 kaizhu wheel 137538 Feb 12 23:40 jquery.min.terser.js -rw-r--r-- 1 kaizhu wheel 89845 Feb 12 23:40 jquery.min.google-closure-compiler.js -rw-r--r-- 1 kaizhu wheel 88681 Feb 12 23:40 jquery.min.uglifyjs-lite.js -rw-r--r-- 1 kaizhu wheel 10563 Feb 12 22:59 package-lock.json drwxr-xr-x 37 kaizhu wheel 1258 Feb 12 23:40 node_modules $
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss