3 ms·
Have you seen C code with SIMD intrinsics? They are an eyesore
by oguz-ismail 2y ago
Have you seen C code with SIMD intrinsics? They are an eyesore
- jsheard 2y agoYou're not wrong but that's more of an issue with C than an issue with intrinsics, in higher level languages like C++ or Rust you have the option to wrap instrinsics in types which are much nicer to work with.
- oguz-ismail 2y ago>C++ or Rust Nah. I find well commented three column AT&T assembly with light use of C preprocessor macros easier and more enjoyable to read.
- t-3 2y agoNot just an eyesore, they also are typed, so any widening or narrowing or using only part of a vector register ends up needing casts so things can get really extremely confusing and cluttered when doing anything beyond basic algebra. With asm it's a much shorter, more elegant and visually-aligned waterfall of code.
- xgkickt 2y agoOnly if using x86-64 IME. Other architectures that don’t require as much shuffling of data are far more legible.