
Sign up to save your podcasts
Or


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]
By 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]