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.