Microsoft just released the Microsoft Ajax Minifier for minifying javascript files. Since I have been using the Yahoo! UI Library: YUI Compressor for .Net to do this in AtomSite, I thought it would be great to compare the two to see which is best. I am mainly interested in the file size reduction but it would be nice to know any speed differences as well.
The Test

This method allows me to test compress some javascript using any method I pass into the Func delegate and capture the results.
To get a reasonable sample of the performance I minified 3 different files with each method 1000 times. I attempted to configure both algorithms to produce the smallest output possible.

The Results

From these results you can see that Microsoft AJAX Minifier creates smaller files in about the same amount of time. Note, both algorithms have been set in aggressive, or hypercrush, mode to rename variables and perform other tweaks for reducing file size. The Microsoft AJAX Minifier seemed to have more granular options for tweaking output. However, the YUI Compressor is open source so you could add additional options if you need them.
The Comparison

And the Winner is..
It depends. I suggest using the Microsoft AJAX Minifier as it produces smaller files. However, the YUI Compressor.Net better satisfies my needs as it can minify both JS and CSS files. So, when I need to minify dynamic combinations of both types of files, I will use Yahoo! UI Library: Compressor for .Net. When I need to do one-time minification during a build or prior to deployment, I will use the Microsoft AJAX Minifier.
Original Source:http://jvance.com/blog/2009/10/20/ComparisonOfYUICompressorForDotNETToMicrosoftAjaxMinifier.xhtml
Related Stuff
-
MooV: Using cutting edge Video phones and Software Video Phones - coupling all that with VoIP and empowering the disabled.
-
Moo Telecom: VoIP communications made easy - Ring anyway with the fun and ease of using a normal phone
-
TagR:Mobile Social Network with Real Time Locations Based services, and Ambience Intelligence, VoiP, IM, Skype, Googletalk, Mapping, Flickr, Events, Calendaring, Scheduling, SecondLife Support
-
ClearSMS : ClearSMS is a Web-based application that lets you send bulk SMS messages to your customers, contacts, or just about anyone.
-
Jajah:jah is a VoIP (Voice over IP) provider, founded by Austrians Roman Scharf and Daniel Mattes in 2005[1]. The Jajah headquarters are located in Mountain View, CA, USA, and Luxembourg. Jajah maintains a development centre in Israel.
-
Skype: It’s free to download and free to call other people on Skype. Skype the number one voice over ip software
- PrivatePhone: a free local phone number with voicemail and messages you can check online or from any phone.
