As gridSize is power of two it could be less one comparison.