Comment

Anthony Ricaud

Have you tried comparing the minified sizes after gzipping? This is the real metric because we send our code gzipped (right?). That might gives a different result

Replies

Peter Bengtsson

Haven't tried yet. Will do when time allows.

Peter Bengtsson

Actually, a quick test:

$ uglifyjs < maxlength_countdown.js > /tmp/uglify.js
$ java -jar ../compiler.jar < maxlength_countdown.js > /tmp/closure.js
$ cd /tmp
$ emacs uglify.js # remove the preamble comment
$ gzip < uglify.js > uglify.js.gz
$ gzip < closure.js > closure.js.gz
$ ls -ltr
-rw-r--r-- 1 peterbe wheel 853 11 Jul 11:23 closure.js
-rw-r--r-- 1 peterbe wheel 857 11 Jul 11:23 uglify.js
-rw-r--r-- 1 peterbe wheel 408 11 Jul 11:24 closure.js.gz
-rw-r--r-- 1 peterbe wheel 405 11 Jul 11:24 uglify.js.gz

So, in this scenario UglifyJS is beaten by 4 bytes but when gzipped it beats Closure by 3 bytes.

Shit this is getting really nitpicky and complex at the same time.