TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Advanced Closure Compiler vs. UglifyJS2

10 pointsby peterbeover 9 years ago

2 comments

yoklovover 9 years ago
Closure compiler advanced mode is an optimizing compiler that will perform several nontrivial transformations while also making your source smaller. Uglify is a minifier, and just makes your source smaller.<p>Apples and oranges comparison. Of course the technology that does more will be slower, especially when the &#x27;more&#x27; requires a great deal of analysis on the input.<p>Note: I&#x27;m not saying closure compiler is better, I actually tend to think that it is not for most usages, as the language it compiles is &#x27;pretty much but not really javascript&#x27;, and the difference there makes it hard to add into an existing build process with confidence.
评论 #10952976 未加载
julian37over 9 years ago
Worth noting that Google Closure Compiler specifically optimizes for post-gzip size:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;closure-compiler&#x2F;wiki&#x2F;FAQ#closure-compiler-inlined-all-my-strings-which-made-my-code-size-bigger-why-did-it-do-that" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;closure-compiler&#x2F;wiki&#x2F;FAQ#closure-...</a>