Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The best thing a current compiler can provide is probably replacing intrinsics with more conventional-looking things like GCC's Vector extensions[1] and C++'s simd<T>. Even then you'd need to do a little bit of union work for the cooler operations.

[1] https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html



The union work turns out to be a lot because compiler extensions and simd<> barely support anything beyond operators.

Examples of what's missing: interleaved load/store, compress/expand, software AES/CLMUL, popcount, lzcnt, saturated add/sub, 128-bit compare/minmax, fixed-point mul, mask find/set, masked load/store, scatter/gather, reductions.

Highway supports those (and >200 operations in total) on all platforms.


I 100% agree that there's a lot of room for improvement here.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: