2 ms·
Are you enabling avx2 for rust as well? What arguments are you using for rust? Try this: RUSTFLAGS="-C target-cpu=native" cargo run --release # or whateve
by josephg 4y ago
Are you enabling avx2 for rust as well? What arguments are you using for rust?
Try this:
RUSTFLAGS="-C target-cpu=native" cargo run --release # or whatever
And:
clang++ -O3 -march=native fts_cpp_copy_bench.cpp -o test.exe
arch=native will also activate SSE, MMX, and all the other goodies that modern CPUs have to offer.
- FpUser 4y agoSorry for being dumb, I thought I've enabled it in ./cargo/config.toml for rust. Checked it again and it appears that I did not (the file name was wrong). -march=native for CLang also did better than just avx2 rust - By-Copy: 1831, By-Borrow: 1850 c++ - By-Copy: 2411, By-Ref: 2458 Interesting why Rust wins with such a large margin. Maybe will try to find out later.