A few more noteworthy ones:

Variable name reuse:
  var x = .....;  print(x); var y = ......; print(y)
  becomes
    var x = .....;  print(x);   x  = ......; print(x)

More aggressive inlining with variables and functions.

A lot more small optimizations that saves a char here and there.

Closure Compiler would also put more effort into your JSNI code for obvious
reasons.

-Alan



On Thu, Jul 5, 2012 at 9:31 AM, Thomas Broyer <t.bro...@gmail.com> wrote:

>
>
> On Thursday, July 5, 2012 5:37:08 AM UTC+2, Magno Machado wrote:
>>
>> I was impressed to see the results achieved on gwt 2.5 by combining the
>> gwt compiler and closure compiler.
>>
>> Well, I always thought there's nothing that closure could do that the gwt
>> compiler couldn't already do, because gwtc have a lot more information
>> about the source than closure compiler.
>>
>
> Yes and no: Closure has "static typing" via JSDoc annotations, and uses
> the same kind of monolithic compilation (i.e. I know everything about what
> will run, so I know what is never used that I can remove).
>
> So I wonder what kind of optimizations closure is doing that were not
>> already done by the gwt compiler?
>>
>
> One small optimization I've read on the Closure Compiler group that I know
> GWT doesn't do: ["ab", "cd", "ef", "ghij"] is compiled into
> "ab,cd,ef,ghij".split(",") !
> (it's more in terms of perfs than in code size I guess though).
> I don't know about the other differences.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/EBpT-fnjCHcJ.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to