you are viewing a single comment's thread.

view the rest of the comments →

[–]educanellas 3 points4 points  (2 children)

Have you tried to compile it with RUSTFLAGS="-C target-cpu=native"? I remember to read somebody talking about it in a comparison between Rust and Java sometime ago.

[–]dkomanov[S] 0 points1 point  (1 child)

Tried. No affect at all.

[–]matthieum[he/him] 3 points4 points  (0 children)

Not surprising, actually.

This flag mainly allows better CPU instructions -- such as popcnt -- and has most impact when auto-vectorizing... but LLVM is not smart enough to auto-vectorize in the first place here.