I’ve been working with JSLint profiling and what they say is true: minification is more efficient if you write your JavaScript following certain JavaScript sub-standards (I know there’s a better way to phrase that).
File Sizes
Original: 27,542 bytes
Original (minified): 21,179
Linted: 30,714
Linted (minified): 20,899
Here’s the scoop. The original file size was 27,542 bytes. When rewritten using Crockford’s “Good Parts” settings in JSLint the file size grew to 30,714 bytes (by ~12%). The original file size minified to 21,179, a savings of 6,363 bytes (~23%).
Here’s where it gets cool.
Linting the file added 3,172. But doing so allowed the compression to reduce the file size to 20,899 bytes, shrinking it by 31% and making it even smaller than the original file was when it was minified!
Awesome and weird, right?