-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Strong performance regression with target-cpu=native #190
Comments
example can be reduced to target-feature=+aes |
It looks like this bench is only hashing |
This does not appear to happen on my intel i9. There must be something odd in the assembly for the Ryzen. |
@fr0staman If you run |
This might be related rust-lang/rust#80633 |
|
|
@tkaitchuck I actually think this issue might be relevant: https://internals.rust-lang.org/t/slower-code-with-c-target-cpu-native/17315/7 |
https://share.firefox.dev/3RWEHk5 without aes flag Aes feature is indeed detected |
@fr0staman Can you check if this is fixed on the 0.9 prerelease branch |
Certainly! Unfortunately, nothing has changed: fr0staman@kotobook:~/source/repos/rust/rust-ahash-target-native-performance-issue$ RUSTFLAGS='-C target-cpu=native' cargo bench
...
Compiling ahash v0.9.0 (https://github.com/tkaitchuck/aHash?branch=0.9-prerelease#af37d79e)
...
Finished bench [optimized] target(s) in 43.16s
Running unittests src/main.rs (target/release/deps/rust_ahash_target_native_performance_issue-a98c230d15dcf9ae)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running benches/issue.rs (target/release/deps/issue-a3d835f7ef64d9be)
Gnuplot not found, using plotters backend
Performance/ahash/(32, 128)
time: [37.539 µs 37.543 µs 37.546 µs]
change: [+97.437% +97.897% +98.305%] (p = 0.00 < 0.05)
Performance has regressed.
Found 4 outliers among 100 measurements (4.00%)
2 (2.00%) high mild
2 (2.00%) high severe
Performance/ahash/(256, 1024)
time: [2.3726 ms 2.3733 ms 2.3740 ms]
change: [+156.12% +156.46% +156.76%] (p = 0.00 < 0.05)
Performance has regressed.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
Performance/ahash/(1024, 4096)
time: [38.066 ms 38.109 ms 38.153 ms]
change: [+154.20% +155.09% +155.95%] (p = 0.00 < 0.05)
Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild |
So, ahash with
target-cpu=native
on my setup shows significant performance regressionThis may be a Rust/LLVM issue, but I'll create an issue here first.
Repro:
https://github.com/fr0staman/rust-ahash-target-native-performance-issue
My setup
Rust:
System:
Results
Standard target
target-cpu=native
The text was updated successfully, but these errors were encountered: