speed improvements for GridIterator