Each Cell has its own copy of arrays int[] dimensions and int[] steps although they are identical for large groups of cells:
All "inner" cells have the same dimensions.
All cells that are (only) on the border in X have the same dimensions.
All cells that are (only) on the border in Y have the same dimensions.
All cells that are (only) on the borders in X and Y have the same dimensions.
...and so on.
The arrays for each group of cells could be pre-computed (by CellGrid) and re-used.
Possibly, the min[] and max[] arrays could be avoided, and computed on the fly? (from the flattened grid index of the cell)
(But there should be a Benchmark to see the impact)
Each
Cell
has its own copy of arraysint[] dimensions
andint[] steps
although they are identical for large groups of cells:The arrays for each group of cells could be pre-computed (by
CellGrid
) and re-used.Possibly, the
min[]
andmax[]
arrays could be avoided, and computed on the fly? (from the flattened grid index of the cell) (But there should be a Benchmark to see the impact)