tuning

GWT vs Handcrafted JavaScript

It’s something I’d been wondering for a while: how does GWT’s JavaScript code stack up to code created and optimized by hand? I hadn’t really seen any exact data, until now.

It’s the age-old question: are you better to handcraft detailed instructions, or do you just let a compiler handle it for you? Assembler vs C? Write your own memory manager or let the garbage collector do that for you?

And now there’s generated JavaScript versus rolling your own. I love the simplicity of writing front-end in the same language as your back-end, but what about performance?

Turns out it’s not too bad. Ciaran McCann did some tests and found out only FireFox had some serious troubles running the GWT code. The test isn’t complete yet, I’m very interested in the stats for Windows.

update: Ciaran has updated his tests with Windows results. I already knew Chrome was great at executing JavaScript, but it appears it’s even better at executing GWT generated JavaScript.

(image credit)

  • http://flax.ie/ CiarĂ¡n McCann

    Thanks for featuring my post, yes I will be following up the Article around Wednesday/Thursday next week with results from Windows xp, Vista, 7, Symbian OS, and also Android.

  • http://twitter.com/csl_ Carl S. Lange

    He's just updated the site with the new benchmarks, including Windows (just XP, though) and android and a bunch of other ones. http://flax.ie/google-web-toolkit-javascript-vs

  • http://www.facebook.com/people/Joel-Regen/771359931 Joel Regen

    i don’t think the performance will be a deciding factor for most people. rather, the number of javascript developers, how cheaply they will work versus java developers.