6 ms·
Good point! It would be interesting to find out where the Rust version gets most of its speed from.
by FartyMcFarter 6y ago
Good point! It would be interesting to find out where the Rust version gets most of its speed from.
- amelius 6y agoYes, it could be mostly LLVM doing the heavy lifting here, for all we know.
- neopallium 6y agoThe 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/ http://cliffle.com/p/dangerust/6/
- jcelerier 6y agoBut, 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.