Google Web Toolkit JavaScript Vs hand Crafted JavaScript benchmark: Part 2

Well for those of you who read the first post about benchmarking GWT vs JavaScript Part 1 on Linux, Mac, iPhone and a variety of browsers, here is the continuation of that article tested on Windows XP, Android OS, Symbian OS and even a build of Chromium OS. For those of you who didn’t you may wish to read this first Google Web Toolkit JavaScript Vs hand Crafted JavaScript benchmark Part 1

[ad#adsence_inline_250*250]

First off I just want to collectively reply to quite a few people who left comments around the web on the first article. A lot of people where pointing out the fact that the bubble sort algothrim doesn’t test the true power of  GWT which is asynchronous programming and reduced latency. I do understand this and I personally think thats why Google Web Toolkit is a brilliant technology, though one of my main interests in GWT is the fact that it allows me to program in Java, a language which I am quite familiar with (Used C# and the .net framework every day in college last year) to create optimized cross-browser compatible Javascript code which can be deployed on the web natively on any device with a web browser. So I needed to check was my code going to be slowed by using GWT which as you can see by most of the results here and  GWT vs JS Part 1, and the answer is no.

Also some would argue my JavaScript code wasn’t optimized, which they would be true in saying but using decrementing loops instead of incrementing loops to make the JavaScript more optimised, but makes the code somewhat more complex and confusing. So yes, the benchmark would have been somewhat affected by this, so in some figures GWT generated JavaScript was even faster then the JavaScript code I had written.

Benchmark & Algothrim changes

  • The algothrim is now run 50 times to get a more accurate reading
  • The first result isn’t counted as it seem to be higher then all other results for both GWT and JS


Conclusions

After carrying out the test I had to remove the emulated android results from the graph as they where off the chart, over 2000ms. I hope this to be just a result of the emulation. I will be receiving an Android tablet from amazon soon which I will test the algorithm on and publish the results. As expected IE 8 didn’t handle the JS or the GWT well at all, which I hope will be improved in IE 9.


I will be posting a third part of this for more updated version of browser, Windows Vista and 7 in a few weeks time. So watch this space for updates.

About the Author

Ciarán McCann

Flax Project Founder - Ciarán McCann is an extremely passionate and motivated programmer who has been programming for about 4 years now. Currently attending Carlow I.T studying computer games development. He has experience in many different programming languages, markup languages and general technologies. His role in the Flax Project is as a blogger/Web Designer and Flax Engine programmer. Please excuse any bad grammar/spelling, I am a bit on the Dyslexic side. Follow me on Twitter for info on what I am working on.

Visit Website

7 Comments

  1. mooo!
    4 years of programming?
    where is the IT world heading at .. ?

    • Well its not all programming experience, I started developing websites, html, CSS, JavaScript about 4 years. Then PHP & MySQL the next year. Then C++, SDL, C# for the last 2 years and now recently Java and GWT

  2. what a great comparison with google…

  3. IE8 has some bugs too although it is more stable than IE7 and IE6.,:

Trackbacks for this post

  1. […] It was also tested on the iPhone in Safari the Macintosh browser. (Part Two of the article is here Google Web Toolkit JavaScript Vs hand Crafted JavaScript benchmark Part 2) (Thanks to […]

  2. […] 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 […]

Leave a Comment

Your email address will not be published. Required fields are marked *

*