5 hours ago · Tech · hide

SIMD is having a moment right now.Go added experimental SIMD support to their standard library.C++26 standardized std::simd (which hasn't been very well received).Portable SIMD is available on nightly Rust via std::simd.The excellent fearless_simd cut a 1.0 release in September. It works on stable Rust.Other languages have already shipped portable SIMD APIs in their standard libraries for a few years. For example, Vector in Zig and Vector in Java.I've always been vaguely aware of the existence of SIMD instructions, but it was Mitchell Hashimoto's Everyone Should Know SIMD that finally inspired me to try writing some code that uses SIMD myself.I decided to take a straightforward problem and try making it faster using SIMD instructions: count the number of occurrences of a byte inside a text file. Since I've been using Rust for writing pretty much everything these days, that's the language I picked for this task.I used enwik9 as my test dataset. This is a file containing a gigabyte of…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town