Общо показвания

октомври 17, 2012

Closure compiler and the adverse effect of using types for optimizations

This is more of a note and less a fully featured post. Just a quick reminder that one should not use types for optimizations if one is not actually providing the types. This way one will not spend almost 30 minutes battling with a code compiled with debug options (and thus extremely ugly) just to figure out why the the code is not working as expected even thou one has followed all the rules of the compiler.

Type optimization is a great addition to the compiler and indeed produces smaller code. So small that it is actually not existing.

So next time you want to have a nice and tidy compiled code, do not forget that you should not just write the code and test it as source and then, just to see how it goes so far as compiled entity, run it with advanced mode and type optimization. You should first write the types. It is easy.
Публикуване на коментар