performance improvements for torus offsets.