One known performance penalty in javascript is accessing properties of objects using the dot operator. It is generally considered to be more performant if properties are deferenced to a scope variable, especially when the property is accessed several times in one scope. This is especially important in loops that are run often or are large.
Grid.js contains a number of loops that operate on the entire set of tiles. Most of these loops use the above technique of dereferencing properties for scope access in the inner loops. There are a couple of notable exceptions, including one case where a row is dereference but the dereferenced var is not actually used for access.
Also, there is one case where parseInt(this.map.layerContainerDiv.style.top) (and left) is called repeated in an inner loop to calculate exactly the same value - the value of top and left are not changed in the loop as far as I can tell - so I propose to move the calculation to happen once outside the loop.
The attached diff contains the appropriate patches against r5050 (head at the time I filed this).