Performance improvements of GWT2.1 for long-based computations

The port of lib-gwt-svg-chess to GWT 2.1 has highlighted an interesting fact. The application makes heavy use of java longs, notably in the attack tables of the carballo chess engines. At the time the code was written, the time to initialize the attack tables turned out to be so long (around two and a half minutes) that I had to pre-compute them, causing a big one-time penalty in the application download size (it was a 5MB download, somewhat mitigated by the use of HTTP deflate header, see my previous post of the topic). Since then, GWT 2.1 has introduced a revamped emulation of java longs, and browsers javascript engines are now much faster. I have been able to get rid of the pre-computed tables and compute them on the fly. The execution time for this part of the code is now:

Browser Ellapsed time
Firefox 3.6 23s
Opera 10.63 14s
Chrome 7 0.5s
Firefox 4.0b7 3s

This certainly beats downloading 4MB of attack tables.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>