𝕭𝖆𝖘𝖘𝖕𝖎𝖘𝖙𝖔𝖑 🎬

Billion row challenge: parsing temperatures fast(ish)


Listen Later

I watched Jon Gjengset taking on the one billion row challenge and got interested in one small corner of it: parsing temperatures, and in particular parsing temperatures in a "branchless" style - with no if statements - to help the CPU run the code as fast as possible. In the end, the results were surprising.

After the stream I added a version of Jon's parse_temperature to the comparison. His version assumes we already know where the semicolon is, so I had to add code to find it, and I didn't use the SIMD code he used to do that because it requires unstable Rust. With those caveats, my version was 4x faster(!). However, I'm pretty sure we're going to need to find that semicolon ourselves if we take on the full challenge, so this is not a fair comparison.

Also after the stream I realised I'm pretty sure there is a simple improvement I can make to branchy to make it even faster...

Read my blog at https://artificialworlds.net/blog

Follow me on mastodon: @[email protected]

...more
View all episodesView all episodes
Download on the App Store

𝕭𝖆𝖘𝖘𝖕𝖎𝖘𝖙𝖔𝖑 🎬By