← findnix.eu
🎬 video.infosec.exchange video.infosec.exchange

Billion row challenge: parsing temperatures fast(ish)

⏱ 1:55:10 🌐 video.infosec.exchange

I watched [Jon Gjengset taking on the one billion row challenge](https://youtu.be/tCY7p6dVAGE?si=YCZlw_clQnjAyb2n) 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

β†—https://video.infosec.exchange/w/bBkw2mCziP2Eax3nCC2mqf
video.infosec.exchange
Indexiert von findnix.eu Β· Eigene Seite einreichen