Speedup rayIntersection a little bit