In this episode we will take a look at implementing SIMD for scanning and searching for particular characters in the file. We'll start by talking about what SIMD is and how we can structure our code to take advantage of it so that we can send a batch of data to the CPU and have it work on it in a single instruction. As with most things performance related it is very nuanced and we will encounter this and talk about potential reasons why SIMD might not be a good fit here.
Post edit note: In this episode, we see some puzzling duration results from running our code across multiple multiple runs. after I finished the episode I realized that the timings that I was looking at is the result of mise running its task entirely, not the output of the time command. So I don't notice this for the whole episode, which is rather annoying, but we will discuss a better way to measure this in a future episode. Links SIMD - Apple Developer Documentation