Test: Faster impl of cubeIndex calc