Optimized AVX intrinsics - now significantly outperforms ISPC.

Previously the AVX intrinsics routine significantly underperformed ISPC.