Also, check_cells takes 50ms for 100k cells, so I wouldn't be too worried about iterating over the whole thing.