frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

The state of SIMD in Rust in 2025

https://shnatsel.medium.com/the-state-of-simd-in-rust-in-2025-32c263e5f53d
65•ashvardanian•2h ago

Comments

mdriley•1h ago
> TL;DR: use std::simd if you don’t mind nightly, wide if you don’t need multiversioning, and otherwise pulp or macerator.

This matches the conclusion we reached for Chromium. We were okay with nightly, so we're using `std::simd` but trying to avoid the least stable APIs. More details: https://docs.google.com/document/d/1lh9x43gtqXFh5bP1LeYevWj0...

josephg•1h ago
Why isn’t std::simd in stabile yet? Why do so many great features seem stuck in the same nightly-forever limbo land - like generators?

I’m sure more people than ever are working on the compiler. What’s going on?

the__alchemist•1h ago
Would love this. I've heard it's not planned to be in the near future. Maybe "perfect is the enemy of good enough"?
CooCooCaCha•59m ago
Rust doesn’t have a BDFL so there’s nobody with the power to push things through when they’re good enough.

And since Rust basically sells itself on high standards (zero-cost abstractions, etc.) the devs go back and forth until it feels like the solution is handed down from the heavens.

ChadNauseam•53m ago
And somehow it has ended up feeling more pleasant and consistent than most languages with a BDFL, even though it was designed by committee. I don't really understand how that happened, but I appreciate the cautious and conservative approach they've taken
singron•1h ago
There is a GitHub issue that details what's blocking stabilization for a each feature. I've read a few recently and noticed some patterns:

1. A high bar for quality in std

2. Dependencies on other unstable features

3. Known bugs

4. Conflicts with other unstable features

It seems anything that affects trait solving is very complicated and is more likely to have bugs or combine non-trivially with other trait-solving features.

I think there is also some sampling bias. Tons of features get stabilized, but you are much more likely to notice a nightly feature that is unstable for a long time and complex enough to be excited about.

ChadNauseam•58m ago
There really aren't that many people working on the compiler. It's mostly volunteers.

The structure is unlike a traditional company. In a traditional company, the managers decide the priorities and direct the employees what to work on while facilitating that work. While there are people with a more managerial type position working on rust compiler, their job is not to tell the volunteers what to work on (they cannot), but instead to help the volunteers accomplish whatever it is they want to do.

I don't know about std::simd specifically, but for many features, it's simply a case of "none of the very small number of people working on the rust compiler have prioritized it".

I do wish there was a bounty system, where people could say "I really want std::simd so I'll pay $5,000 to the rust foundation if it gets stabilized". If enough people did that I'm sure they could find a way to make it happen. But I think realistically, very few people would be willing to put up even a cent for the features they want. I hear a lot of people wishing for better const generics, but only 27 people have set up a donation to boxy (lead of the const generics group https://github.com/sponsors/BoxyUwU ).

Avi-D-coder•37m ago
Usually when I go and read the github and zulip threads the reason for paused work comes down to the fact that no one has come up with a design that maintains every existing promise the compiler has made. The most common ones I see are the feature conflicts with safety, semver/encapsulation, interacts weirdly with object safety, causes post post-monomorphization errors, breaks perfect type class coherence (see haskells unsound specialization).

Too many promises have been made.

Rust needs more unsafe opt outs. Ironically simd has this so it does not bother me.

IshKebab•30m ago
I would love generators too but I think the more features they add the more interactions with existing features they have to deal with, so it's not surprising that its slowing down.
JoshTriplett•5m ago
> Why isn’t std::simd in stable yet?

Leaving aside any specific blockers:

- It's a massive hard problem, to build a portable abstraction layer over the SIMD capabilities of various CPUs.

- It's a massive balance between performance and usability, and people care deeply about both.

- It's subject to Rust's stability guarantee for the standard library: once we ship it, we can't fix any API issues.

- There are already portable SIMD libraries in the ecosystem, which aren't subject to that stability guarantee as they can ship new semver-major versions. (One of these days, I hope we have ways to do that for the standard library.)

- Many people already use non-portable SIMD for the 1-3 targets they care about, instead.

the__alchemist•1h ago
Of interest, I've written my own core::simd mimic so I don't have to make all my libs and programs use nightly. It started as me just making my Quaternion and Vec lib (lin-alg) have their own SoA SIMD variants (Vec3x16 etc), but I ended up implementing and publicly exposing f32x16 etc. Will remove those once core::simd is stable. Downside: These are x86 only; no ARM support.

I also added packing and unpacking helpers that assist with handling final lane 0 values etc. But there is still some subtly, as the article pointed out, compared to using Rayon or non-SIMD CPU code related to packing and unpacking. E.g. you should try to keep things in their SIMD form throughout the whole pipeline, how you pair them with non-SIMD values (Like you might pair [T; 8] with f32x8 etc) etc.

____tom____•48m ago
I'm not a rust programmer.

Can't you just make a local copy of the existing package and use that? Did you need to re-implement?

the__alchemist•45m ago
Good question. Probably, but I don't know how and haven't tried.
dzaima•7m ago
The nightly built-in core::simd makes use of a bunch of intrinsics to "implement" the SIMD ops (or, rather, directly delegate the implementation to LLVM which you otherwise cannot do from plain Rust), which are as much if not more volatile than core::simd itself (and also nightly-only).
bencyoung•1h ago
Odd that c# has a better stable SIMD story than Rust! It has both generic vector types across a range of sizes and a good set of intrinsics across most of the common instruction sets
kelnos•40m ago
Why would that be odd? C# is an older and mature language backed by a corporation, while Rust is younger and has been run by a small group of volunteers for years now.
jiehong•29m ago
C# is blessed on that front. Java’s SIMD state is still sad, and golang is not as great either.
ashf023•18m ago
Yeah, golang is a particular nightmare for SIMD. You have to write plan 9 assembly, look up what they renamed every instruction to, and then sometimes find that the compiler doesn't actually support that instruction, even though it's part of an ISA they broadly support. Go assembly functions are also not allowed to use the register-based calling convention, so all arguments are passed on the stack, and the compiler will never inline it. So without compiler support I don't believe there's any way to do something like intrinsics even. Fortunately compiler support for intrinsics seems to be on its way! https://github.com/golang/go/issues/73787
exyi•20m ago
C# portable SIMD is very nice indeed, but it's also not usable without unsafety. On the other hand, Rust compiler (LLVM) has a fairly competent autovectorizer, so you may be able to simply write loops the right way instead of the fancy API.
IshKebab•40m ago
> Fortunately, this problem only exists on x86.

Also RISC-V, where you can't even probe for extension support in user space unfortunately.

raphlinus•32m ago
It's not strictly x86 either, the other case you care about is fp16 support on ARM. But it is included in the M1 target, so really only on other ARM.
dzaima•19m ago
Linux of course does have an interface for RISC-V extension probing via hwprobe. And there's a C interface[1] for probing that's OS-agnostic (though it's rather new).

[1]: https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/s...

jtrueb•18m ago
simd was one I thought we needed. Then, i started benchmarking using iter with chunks and a nested if statement to check the chunk size. If it was necessary to do more, it was typically time to drop down to asm rather than worry about another layer in between the code and the machine.

Solarpunk is already happening in Africa

https://climatedrift.substack.com/p/why-solarpunk-is-already-happening
90•JoiDegn•51m ago•36 comments

Dillo, a multi-platform graphical web browser

https://github.com/dillo-browser/dillo
103•nazgulsenpai•2h ago•43 comments

The state of SIMD in Rust in 2025

https://shnatsel.medium.com/the-state-of-simd-in-rust-in-2025-32c263e5f53d
66•ashvardanian•2h ago•23 comments

New gel restores dental enamel and could revolutionise tooth repair

https://www.nottingham.ac.uk/news/new-gel-restores-dental-enamel-and-could-revolutionise-tooth-re...
121•CGMthrowaway•1h ago•69 comments

OpenAI ends legal and medical advice on ChatGPT

https://www.ctvnews.ca/sci-tech/article/openai-updates-policies-so-chatgpt-wont-provide-medical-o...
69•randycupertino•2h ago•83 comments

Ruby and Its Neighbors: Smalltalk

https://noelrappin.com/blog/2025/11/ruby-and-its-neighbors-smalltalk/
129•jrochkind1•5h ago•61 comments

The shadows lurking in the equations

https://gods.art/articles/equation_shadows.html
218•calebm•6h ago•71 comments

I want a good parallel language [video]

https://www.youtube.com/watch?v=0-eViUyPwso
29•raphlinus•1d ago•11 comments

Tesla's German car sales more than halve in October as wider EV sales jump

https://www.reuters.com/business/autos-transportation/teslas-german-car-sales-more-than-halved-oc...
38•moosedman•41m ago•35 comments

An eBPF Loophole: Using XDP for Egress Traffic

https://loopholelabs.io/blog/xdp-for-egress-traffic
167•loopholelabs•1d ago•66 comments

Carice TC2 – A non-digital electric car

https://www.caricecars.com/
144•RubenvanE•6h ago•102 comments

Why aren't smart people happier?

https://www.theseedsofscience.pub/p/why-arent-smart-people-happier
36•zdw•4h ago•69 comments

A P2P Vision for QUIC (2024)

https://seemann.io/posts/2024-10-26---p2p-quic/
72•mooreds•6h ago•32 comments

Learning from failure to tackle hard problems

https://blog.ml.cmu.edu/2025/10/27/learning-from-failure-to-tackle-extremely-hard-problems/
78•djoldman•6d ago•20 comments

Norway reviews cybersecurity after remote-access feature found in Chinese buses

https://scandasia.com/norway-reviews-cybersecurity-after-hidden-remote-access-feature-found-in-ch...
201•dredmorbius•4h ago•125 comments

Internet Archive's legal fights are over, but its founder mourns what was lost

https://arstechnica.com/tech-policy/2025/11/the-internet-archive-survived-major-copyright-losses-...
48•thinkcontext•1h ago•17 comments

NY smartphone ban has made lunch loud again

https://gothamist.com/news/ny-smartphone-ban-has-made-lunch-loud-again
111•hrldcpr•7h ago•67 comments

SPy: An interpreter and compiler for a fast statically typed variant of Python

https://antocuni.eu/2025/10/29/inside-spy-part-1-motivations-and-goals/
203•og_kalu•6d ago•97 comments

The grim truth behind the Pied Piper (2020)

https://www.bbc.com/travel/article/20200902-the-grim-truth-behind-the-pied-piper
81•Anon84•8h ago•84 comments

Radiant Computer

https://radiant.computer
154•beardicus•7h ago•114 comments

Optimism associated with exceptional longevity (2019)

https://www.pnas.org/doi/10.1073/pnas.1900712116
54•RickJWagner•7h ago•48 comments

iOS 26.2 to allow third-party app stores in Japan ahead of regulatory deadline

https://www.macrumors.com/2025/11/05/ios-26-2-third-party-app-stores-japan/
283•tosh•8h ago•198 comments

Founder in Residence at Woz (San Francisco)

1•bcollins34•8h ago

I Stopped Being a Climate Catastrophist

https://www.breakthroughjournal.org/p/why-i-stopped-being-a-climate-catastrophist
15•paulpauper•38m ago•0 comments

Wafer-Scale AI Compute: A System Software Perspective

https://www.sigops.org/2025/wafer-scale-ai-compute-a-system-software-perspective/
4•matt_d•1w ago•0 comments

Making MLS More Decentralized

https://blog.phnx.im/making-mls-more-decentralized/
14•cityroler•1w ago•1 comments

Removing XSLT for a more secure browser

https://developer.chrome.com/docs/web-platform/deprecating-xslt
144•justin-reeves•6h ago•212 comments

Ask HN: My family business runs on a 1993-era text-based-UI (TUI). Anybody else?

207•urnicus•6h ago•210 comments

Microsoft Can't Keep EU Data Safe from US Authorities

https://www.forbes.com/sites/emmawoollacott/2025/07/22/microsoft-cant-keep-eu-data-safe-from-us-a...
205•Mossy9•6h ago•67 comments

UPS plane crashes near Louisville airport

https://avherald.com/h?article=52f5748f&opt=0
336•jnsaff2•21h ago•358 comments