Optimize the {x, y} type for grid, trim.