Speed up random rotation matrix implementation