SlimIt is in its infancy yet but it can already minify some stuff out.
|jQuery 1.6 (bytes)||jsmin (bytes)||SlimIt (bytes)|
As you can see SlimIt on this source file performs better reducing jquery-1.6.js by additional 964 bytes.
I have to note though that SlimIt is currently slower than jsmin and there are two contributing factors:
1. SlimIt is a complete source-to-source compiler where you have a parser. a lexer and the parser constructs an AST and then minified code is generated by an AST tree walker.
2. Minifier/tree walker uses += operator when concatenating strings and it hurts performance on large strings and multiple concatenations.
Standard solution is to use list.append() and ”.join() methods because they are faster, but I didn’t bother with the speed for now (that will be the target of next releases) – as they say “Make it work first, then make it faster”.
Due to the nature of the minifier (source-to-source compiler) there are many ways how to improve minification considerably, so stay tuned – next releases will give even more bang for the buck.
UPDATE: Looks like http://slimit.org doesn’t work reliably for everyone so here is a direct link to documentation where you’ll find all necessary information with further links: http://packages.python.org/slimit Meanwhile I’ll be looking for a place to host the package’s documentation reliably with slimit.org domain.