Skip to content

Instantly share code, notes, and snippets.

@SamSaffron
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SamSaffron/e7903343d2b6a7a76801 to your computer and use it in GitHub Desktop.
Save SamSaffron/e7903343d2b6a7a76801 to your computer and use it in GitHub Desktop.
time uglifyjs application-562d06f26173e4aac152e64bfb6e0981.js -c -m > b.js
4.98s user 0.16s system 101% cpu 5.077 total
---
require 'uglifier'
f = File.read("application-562d06f26173e4aac152e64bfb6e0981.js")
c = Uglifier.compile(f)
File.open("a.js", 'w') do |f|
f.write(c)
end
---
time ruby test.rb
ruby test.rb 33.71s user 0.36s system 100% cpu 33.991 total
% ls -al ?.js
-rw-rw-r-- 1 sam sam 1154635 Dec 12 12:24 a.js
-rw-rw-r-- 1 sam sam 1154619 Dec 12 12:20 b.j
---
Uglifyjs via gem: 33 seconds, via node 5 seconds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment