#
✕ nick:linkmauve
#asahi · 2026-09-12 22:51
linkmauveI’ve done SIMD in Rust just fine, on both amd64, AArch64 and PowerPC.
#asahi · 2026-09-12 22:49
linkmauve(This isn’t the portable SIMD project, I used normal intrinsics.)
#asahi · 2026-09-12 22:49
linkmauveIt is.
#asahi · 2026-09-12 22:44
linkmauveIt is marked #[inline] though.
#asahi · 2026-09-12 22:43
linkmauveOh uh, _mm_hadd_ps() doesn’t get inlined? That seems like an omission in the core crate.
#asahi · 2026-09-12 22:38
linkmauveIt’d be more about whether the computed values are correct than about performances atm.
#asahi · 2026-09-12 22:33
linkmauveWith some tests I’d be much more confident that things are working, but otherwise it’s pretty much the exact same algorithm as the NEON one.
#asahi · 2026-09-12 22:31
linkmauveNew version, with both SSE and NEON versions: https://linkmauve.fr/files/hilbert_iir.rs
#asahi · 2026-09-12 21:46
linkmauveInteresting.
#asahi · 2026-09-12 21:45
linkmauveYes. :3
#asahi · 2026-09-12 21:44
linkmauveWould it also be useful to write a SSE2 or AVX version btw, for x86 computers?
#asahi · 2026-09-12 21:43
linkmauveIdeally we’d have tests though. ^^'
#asahi · 2026-09-12 15:32
linkmauveBut I don’t have access to any Apple hardware newer than G4, so…
#asahi · 2026-09-12 15:32
linkmauveI could do a PR later if you’re still interested, if that improves things in any way on your target hardware.
#asahi · 2026-09-12 15:31
linkmauveBut this would only help slightly with cache locality, and probably not at all with actual throughput.
#asahi · 2026-09-12 15:29
linkmauveld1/2/3/4 are some pretty fun ARM instructions, they deinterleave arrays, and st1/2/3/4 are the instructions to interleave them back.
#asahi · 2026-09-12 15:28
linkmauveAnother slight optimization could be to use an array of Complex, and use ld2 instead of ld1 to deinterleave into two registers at once.
#asahi · 2026-09-12 15:27
linkmauveAlso, the loops get fully unrolled, it might not be the best depending on the icache and prefetch characteristics of the core.
#asahi · 2026-09-12 15:26
linkmauveWe could do away with the asserts by changing from an array of slices to an array of arrays, but those shouldn’t be that bad probably.
#asahi · 2026-09-12 15:21
linkmauveAnyway, here is my experiment, maybe the difference will be faster on Apple CPUs: https://linkmauve.fr/files/hilbert_iir.rs
#asahi · 2026-09-12 15:20
linkmauveAlso you don’t have any test, so I don’t know if I got it right or not.
#asahi · 2026-09-12 15:16
linkmauveThis function was completely scalar before.
#asahi · 2026-09-12 15:15
linkmauveOn this phone it seems bottlenecked by memory bandwidth, not by the CPU (at least not much).
#asahi · 2026-09-12 15:15
linkmauveJamesCalligeros[m], chadmed, autovectorization was indeed not working at all in the hottest function, Filter::process(). I just wrote some NEON intrinsics to speed things up and the example went from ~830ms on my Cortex-A53 phone down to ~775ms.
#asahi · 2026-09-10 13:37
linkmauveDo I still need multiple mics?
#asahi · 2026-09-10 13:32
linkmauveAnd if auto-vectorization isn’t working properly, manual SIMD is also my thing.
#asahi · 2026-09-10 13:32
linkmauveEspecially Rust.
#asahi · 2026-09-10 13:31
linkmauveIs it possible to test that stuff without having access to any Apple hardware? Speeding things up is kinda my thing. ^^
#asahi · 2026-07-26 16:52
linkmauveI have zero interest in x86 though, my current Lenovo laptop works extremely well.
#asahi · 2026-07-26 16:51
linkmauveSo I’m not lacking in projects. ^^
#asahi · 2026-07-26 16:51
linkmauveAt some point I also want to improve the support of my iBook G4, it’s lacking various drivers (or perhaps OF device tree isn’t read correctly?) such as battery reading or making the radeon driver to work.
#asahi · 2026-07-26 16:50
linkmauveAnyway I don’t have that kind of money, so let’s get back to the Wii. :)
#asahi · 2026-07-26 16:50
linkmauveDamn.
#asahi · 2026-07-26 16:50
linkmauveAh…
#asahi · 2026-07-26 16:49
linkmauveAlthough it’s indeed becoming cheaper and cheaper, 270€ for a laptop: https://www.ebay.fr/itm/358754163875
#asahi · 2026-07-26 16:46
linkmauveI earn about twice as that per month, but have to pay about 500€ in rent. :(
#asahi · 2026-07-26 16:45
linkmauve-EMONEY
#asahi · 2026-07-26 16:44
linkmauveI really wish I had some modern Apple hardware to play with that.
#asahi · 2026-07-26 16:41
linkmauveWhat do you use that for? Accessing dmabuf from the kernel?
#asahi · 2026-07-26 16:35
linkmauveThanks. :)
#asahi · 2026-07-26 16:34
linkmauveIs your email address the one in 9158b8e363b408c9f19fbc43776dcd0a708b02d8?
#asahi · 2026-07-26 16:34
linkmauveAck!
#asahi · 2026-07-26 16:33
linkmauveSo I don’t know what to work on next, perhaps input.
#asahi · 2026-07-26 16:33
linkmauveFor DRM I’m kinda blocked by Lyude’s KMS bindings anyway, I’ll let them get them back in shape.
#asahi · 2026-07-26 16:33
linkmauveWanna review my next nvmem series, so that I can move on to other things, and perhaps snd at some point?
#asahi · 2026-07-26 16:30
linkmauvechaos_princess, so currently you’re calling into the unsafe bindgen functions?
#asahi · 2026-07-26 16:29
linkmauveWell, mixing different sources in hardware would be useful I think.
#asahi · 2026-07-26 16:28
linkmauveWhat do you want to do with it btw? Would you like to work on that together?
#asahi · 2026-07-26 16:27
linkmauveI’ve done nothing with the AI and DSP parts of the Wii so far, and the latter even requires programming for its own very weird 16-bit architecture.
#asahi · 2026-07-26 16:27
linkmauveSound is an area I know pretty much nothing about!

plus ›