Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. When did Google get so weird? (sancho.bearblog.dev)
    148comments
  2. Ember-1 (fireworks.ai)
    136comments
  3. Alan Kay's answer to "Did the ENIAC have a BIOS"? (quora.com)
    16comments
  4. Lunar Terminator Paradox (secretsauce.net)
    —discuss
  5. Show HN: Lofi Cities – Pixel-art city nights with browser-generated lofi (loficities.com)
    33comments
  6. The state of SIMD in Rust in 2026 (shnatsel.github.io)
    12comments
  7. In an $80 motel room, a discovery to shed light on the origins of life (nytimes.com)
    67comments
  8. Imp is a full port of DSPy to the BEAM (github.com/deepfates)
    4comments
  9. What I did at Recurse Center (thill.me)
    7comments
  10. Oral history of John Chowning, inventor of FM synthesis [video] (youtube.com)
    5comments
  11. Don't couple your Go code to GitHub (iain.rocks)
    37comments
  12. There is more to code review than (automatable) detection (adaptivecapacitylabs.com)
    1comments
  13. Writing Efficient C++ Code (2013) (asawicki.info)
    73comments
  14. Replacing the old battery on rechargeable bike lights (jvns.ca)
    59comments
  15. Show HN: TinyAIArena watch AI agents battle it out (tinyaiarena.com)
    36comments
  16. The Cartesian Hand: In-Hand Manipulation with All-Linear Fingers (generalroboticslab.com)
    7comments
  17. Fragment of oldest known peace treaty found in Turkey (livescience.com)
    6comments
  18. The Normalization of Inexplicable Failures (ihatethefuture.com)
    85comments
  19. Flip Fluid on Flip Dots (mitxela.com)
    22comments
  20. Previously unheard recordings of John Coltrane, captured by Frank Tiberi (jazzwise.com)
    9comments
  21. Fakecloud: Local AWS cloud emulator for integration tests (fakecloud.dev)
    46comments
  22. Faster prompt lookup drafting in llama.cpp (jadidbourbaki.github.io)
    9comments
  23. KICKI: a DECsystem1060 (icm.museum)
    2comments
  24. On caring for user data: NeoVim caused Vim undo files to be deleted (aresluna.org)
    286comments
  25. Video CDs Break Windows Explorer (clydesnotes.blogspot.com)
    27comments
  26. Wiki Deep dive into Standard diving dress (wikipedia.org)
    1comments
  27. Allegations of US interference in Quebec election (globalnews.ca)
    9comments
  28. Improving site performance by shipping more CSS (github.blog)
    60comments
  29. C's Flexible Integer Sizes Were Not a Design Mistake (pikuma.com)
    102comments
  30. Go Concurrency Distilled (antonz.org)
    166comments

The state of SIMD in Rust in 2026

45 pointsby 2d agoshnatsel.github.io
11 comments
1h agoHN ↗

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. ;)

1h agoHN ↗

there is no portable SIMD

Except in languages with a JIT compiler

1h agoHN ↗

Starts to get a bit philosophical on what constitutes "portable" but JIT compilers would emit an opcode based off of whatever the frontend/IR is saying to do surely?

1h agoHN ↗

What about numpy, numba, and torch.compile?

43m agoHN ↗

Those are manually optimized per arch, aren't they?

1h agoHN ↗

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.

55m agoHN ↗

It's a continuum. Some things basically all SIMD implementations support. Want to add 2 4xf32 vectors together? That's pretty easy to do portably.

But yeah to be fair if you are at that point, you probably want to go fully non-portable anyway. Especially with AI.

Has anyone even figured out how to do vector stuff (SVE/RVV) without assembly?

19m agoHN ↗

I agree with that historically auto-vertorization does not seem to work reliably. I'm not sure about your broad claim.

Thoughts on an abstraction over ARM and x86, at 128, 256, and 512-bit widths which, either in a manual or automatic way (The latter more challenging) makes your floating point computations 4-16x faster with minimal restructuring? I think that's doable, and a nice goal of SIMD.

9m agoHN ↗

You've got a point but are overstating it considerably. There is a big gap between just autovectorization and the portable primitives a library like Highway or Fearless SIMD will give you. For example, I haven't seen autovectorization do select or swizzle.

But there's another point in the tradeoff space. One of the explicit design decisions in Fearless SIMD is to support "downcasting," or specialization to a specific microarchitecture. At least for the kind of problems I've worked on, even when you're doing something fancy with arch-specific permutations or what not, the majority of the operations will be pretty vanilla, and can be expressed well in the portable subset.

So you can think of a library like Fearless SIMD as enabling your extreme optimization use case, just more ergonomically.

Of course, this depends on LLVM compiling intrinsics to assembly efficiently. That hasn't always been the case, and is not perfect now (a number of issues have been filed against rustc and LLVM while developing Fearless SIMD), but is pretty good.

As always, though, you do have to measure performance, and I frequently look at the assembler output to double-check that it's doing the right thing. The day of "fire and forget" portable SIMD has not yet arrived.

21m agoHN ↗

I am using my own lib, `lin_alg`, which apes core_simd for floating point values, and extends the concept to vectors and quaternions. I will eventually replace the floating point portions with core::simd upon its arrival in stable Rust.

Downside: It's currently x86 only.