News for hackers. Stuff that matters.
Re:Rust is now overall faster than C in benchmarks by FartyMcFarter on Sunday January 03, 2021 @04:21PM (#25625360)
Good point! It would be interesting to find out where the Rust version gets most of its speed from.
Re:Rust is now overall faster than C in benchmarks by neopallium on Monday January 04, 2021 @12:12AM (#25628111)
The Rust compiler can auto-vectorize loop code.

This blog post shows how to write simple idiomatic Rust code that will allow the compiler to auto-vectorize:

http://cliffle.com/p/dangerust/6/

Re:Rust is now overall faster than C in benchmarks by jcelerier on Monday January 04, 2021 @06:25AM (#25629959)
But, C and C++ compilers also can autovectorize quite well. I had some SSE & AVX algorithms where the compiler ended up doing the same or lightly better job in C++ for instance.

So maybe it's just the C benchmark being a cargo cult.

Re:Rust is now overall faster than C in benchmarks by amelius on Sunday January 03, 2021 @07:57PM (#25626853)
Yes, it could be mostly LLVM doing the heavy lifting here, for all we know.