Hacker News new | ask | show | jobs
by Sharlin 66 days ago
Getting 2x or 4x performance in your inner loops using a reasonable SIMD library is infinitely better than theoretically getting 8x performance with hand-coded nonportable intrinsics, because the latter is never going to happen in most programs, so the actual point of comparison is scalar code, or autovectorized code at best.
2 comments

No it's not because it sucks the air out from the actual solution. ISPC more than a decade ago managed to demonstrate close-to-linear speedups for increasing vector sizes, even for branchy code.

Nowadays you can even get AI to write intristics and it works just fine, the portable libraries/autovec aren't really a serious player here.

Portability is also overstated - see the recent shift where Spotify decided to make native Android/iOS apps again instead of React Native. Usually, the number of relevant platforms is somewhere between 2 and 3, so portability concerns are more theoretical than real.

2x/4x/8x is still thinking in terms of autovec.

I'm getting 50x faster code with manual ASM. That's the difference between audio code that runs in realtime and code that does not.

The competing implementations use SIMD and native code, autovec works nicely there. I symbolically invert the LinAlg system at compile time.