News for hackers. Stuff that matters.
Re:Static search trees: 40x faster than binary search by skrebbel on Wednesday January 01, 2025 @11:49AM (#42567177)
Ahh right, I've been doing too much TypeScript lately. I thought a type parameter couldn't impact behavior but only typechecking but clearly in Rust (like in C++) it can. Thanks for the explanation!

Ah so splat is like a memset for the entire vector to the same value. OK makes sense, I bet that wasn't actually a Rust-ism at all, just basic SIMD lingo I didn't know. Thanks again!

Re:Static search trees: 40x faster than binary search by shawn_w on Wednesday January 01, 2025 @11:30PM (#42571640)
It's the Intel intrinsic `_mm256_set1_epi32()` except with an amusing name. Got to give Rust the win here.
Re:Static search trees: 40x faster than binary search by skrebbel on Thursday January 02, 2025 @03:08PM (#42578265)
wow yeah, i way prefer Rust's notation there! but i assume you could make a similar zero-cost abstraction with some mildly crazy C++ template programming.