News for hackers. Stuff that matters.
Re:AVX512 intrinsics for JDK’s Arrays.sort methods by jandrewrogers on Wednesday May 31, 2023 @01:55PM (#36141412)
Compilers will always be terrible at vectorizing code because the required transformation is architectural. It would require the compiler to understand your code well enough to replace the scalar algorithms and data structures with new ones that are semantically equivalent in all contexts with all necessary invariants preserved (e.g. how memory is organized). The code transformation would be very non-local.

Compilers can't generally rewrite your scalar code as vector code for the same reason they can't rewrite your b-tree as a skip list.

There are no comments on this comment yet.