-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5x slowdown in 1.11.0-rc1 compared to 1.10.4 #55227
Comments
I'm seeing ~8 seconds on 1.10, so I'm not fully sure what's going on here. |
What processor do you have? I should have pointed out that on x86-64 and i686 with BMI2 the code uses the PDEP instruction (via (I've just checked: PDEP does get used with 1.11.0-rc1.) |
I have a Zen 2 (3600) which iirc also has BMI2. |
oh, Zen2 only has micro-coded PDEP that LLVM is likely avoiding since it is slow. So the issue seems to be whether or not LLVM is emitting PDEP instructions where it should. |
Actually looking at the code shows that I'm getting pdeps emitted in both 1.10 and 1.11. The difference seems to be that 1.11 is spilling and reloading a ton of variables. e.g:
@topolarity or @gbaraldi any idea why the codegen would be this bad? |
I don't know if this adds to the mystery or clears it up, but here is another function that I would expect to be equivalent to the
With this
|
Potentially llvm/llvm-project#78506 ? Or excessive unrolling? |
@gbaraldi In my example,
This sounds indeed like the "lots of temporary variables" mentioned in llvm/llvm-project#78506. |
The problem is also present in master (LLVM 18), but to a smaller extent: There I see a 2.4x slowdown instead of 5.4x for 1.11.0-rc2.
As mentioned in the updated OP, one can now use the latest published version (v0.3.0) of SmallCollections.jl to reproduce the issue. |
possible dup: #52933 |
While working on my package SmallCollections.jl, I've noticed a significant slowdown in 1.11.0-rc1:
EDIT:
sh = shuffles(2, 2, 2, 2, 2, 2)
(6 arguments) is enough for a 5x slowdown.The functionality is not yet in the published version, nor in master.You can use the latest published version (v0.3.0) of SmallCollections.jl.
The text was updated successfully, but these errors were encountered: