News for hackers. Stuff that matters.
Re:The Rust Calling Convention We Deserve by Ygg2 on Friday April 19, 2024 @09:55AM (#40086884)
> means that it is beneficial to not deviate too much from what C++ does

Or just C.

Reminds me when I looked up SIMD instructions for searching string views. It was more performant to slap a '\0' on the end and use null terminated string instructions than to use string view search functions .

Re:The Rust Calling Convention We Deserve by mananaysiempre on Friday April 19, 2024 @02:47PM (#40090601)
Huh, I thought they fixed that (the PCMPISTR? string instructions from SSE4.2 being significantly faster than PCMPESTR?), but looks like the explicit-length version still takes twice as many uops on recent Intel and AMD CPUs. They don’t seem to get much use nowadays anyway, though, what with being stuck in the 128-bit realm (there’s a VEX encoding but that’s basically it).