I think something like this would need a -XoptForSize, because I believe it
could impact startup time. There's a somewhat similar proposal here:
http://code.google.com/p/google-web-toolkit/wiki/PrototypeChainingOptimization

Keep in mind that's likely that "function Foo(){}" is likely reduced by gzip
to a very small size, since the deflate algorithm encodes repeating keywords
like 'function' and '(){}' as pointers to previous occurences, and
"function" would be replaced by Huffman coded symbols.


On Thu, Jul 2, 2009 at 3:11 PM, Andrés Testi <[email protected]>wrote:

>
> Having a function like:
>
>  function d(){
>    return function(){};
>  }
>
> ... class declarations like:
>
>  function Foo(){}
>
> ... could be reduced to:
>
>  var Foo=d()
>
> ... reducing compiled code by 5 characters for each declaration.
>
>
> - Andrés
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to