dethe/forge — pull request #1 by kaen (2012-06-13 04:05:11+00:00)
Title: Eliminate .split() calls in rendering loop

I changed the tiles (specs?) to be represented with object literals so that split() isn't called for each tile every frame. Just this change changed the time chromium spent in draw() from 41% to 32% for me. You could even clean it up more by defining variables which refer to each terrain/offset combo (that way you only have references instead of distinct objects)