‹ BackHN Continuity

Thread

The state of SIMD in Rust in 2026

209 points · 65 comments · verdagon

  1. Archit3ch · · focus · HN ↗
    Hot take: there is no portable SIMD.

    You can either have performance (=write manual ASM for each platform), or portability, but not both.

    What so-called "portable SIMD" libraries give you is "portable auto-vectorization". "Portable performance" is a global property of the algorithm. Relying on auto-vectorization will result in e.g. sub-optimal register spills in practice. The microbenchmarks will look great, though. ;)

    1. Sharlin · · focus · HN ↗
      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.
      1. Archit3ch · · focus · HN ↗
        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.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.