u/Russell016in r/programming • Recommends
On “How Fast Can You Parse 1 Billion Rows in Java? – Insane Speed Test • Roy van Rijn”
I've been watching a stream where someone does the equivalent but in Rust.
Link: link to this video
111K subscribers • 8 videos on Hallway
Advanced. Deep dive for people who know the field.
149K views11 months ago1 recommendation
Programming languagesSystems programmingRustPerformance and optimizationConcurrency and parallelism
Jon Gjengset live-codes an optimized Rust implementation for the One Billion Row Challenge, exploring SIMD, profiling, and CPU-level performance.
I'm late to the party, but it's time we take a stab at the One Billion Row Challenge ( github.com/gunnarmorling/1brc ) in Rust. It's an excellent way to dig into optimizing Rust code and learning somethings about assembly, SIMD, performance profiling, and just CPUs in general in the process, so let's take it on! Thanks to the sponsor of this video, Hudson River Trading. If you're interested in finding out more about them, see hudsonrivertrading.com/gjengset There are already several Rust implementations ( github.com/gunnarmorling/1brc/discussions/57 ), this excellent write-up ( curiouscoding.nl/posts/1brc/ ), and even an existing stream ( youtube.com/watch?v=Q-0durxAB6s ), but I'm hoping that walking through the iterative optimization process live is still a good teaching exercise. You can find my implementation at github.com/jonhoo/brrr, and the commit at the end of the stream is github.com/jonhoo/brrr/commit/f1ef7ecd9305be997f6ae0bc6a2c44…. The other posts I refer to in the video are: - github.com/gunnarmorling/1brc/discussions/57 - curiouscoding.nl/posts/1brc/ - github.com/gunnarmorling/1brc/discussions/138#discussioncomm… Housekeeping The One Billion Row Challenge The easy version First, the build configuration Aside: reliable perf symbols Letting perf guide us Avoid UTF-8 parsing Memory mapping the file Fixed point temperature Splitting strings Hashing... Inspiration from a Java solution Inlining short keys Concurrent data loading Playing with the map type Inspiration from another Java solution SIMD in next_line Branchless temperature parsing Avoiding load_or_default Multithreading More hashing Cycle hunt Shrinking stats Temperature parsing again Maybe hashing this time Closing thoughts Live version with chat: youtube.com/live/g2EKNXKKGM4?feature=shareWhat people say. Recommended as a comprehensive live-coding walkthrough of optimizing Rust code for extreme performance.
u/Russell016in r/programming • Recommends
On “How Fast Can You Parse 1 Billion Rows in Java? – Insane Speed Test • Roy van Rijn”