-
-
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
Dot calling in global scope has excessively long compilation time #26767
Comments
Would be good to bisect this. |
I happen to have a bunch of random branches already checked out and built:
|
On freshly pulled master (890239f), I get (without any prior warm-up): julia> @time identity.(rand(2));
1.097517 seconds (192.40 k allocations: 11.320 MiB, 0.40% gc time)
julia> f(x) = x;
julia> @time f.(rand(2));
0.063176 seconds (30.62 k allocations: 1.681 MiB) The first one is still significantly slower than on 0.6, but that could potentially be a question of what is precompiled in the sysimg? The second one is pretty similar to 0.6. |
Yeah, seems much better now. Perhaps #26785 or did that only touch disabled code? |
Is this a dup of #26714? julia> @time identity.(rand(2));
4.359986 seconds (1.13 M allocations: 66.379 MiB, 1.29% gc time)
julia> @time @code_warntype 1+1
# ...
2.755632 seconds (1.20 M allocations: 66.892 MiB, 0.43% gc time) or (is fresh session): julia> @time @code_warntype 1+1;
# ...
6.947450 seconds (2.12 M allocations: 121.545 MiB, 1.01% gc time)
julia> @time identity.(rand(2));
0.164185 seconds (210.29 k allocations: 11.828 MiB, 2.02% gc time) |
Yeah, looks like both are testing the same thing, probably invoking inference for the first time. Closing as dup of #26714 |
0.6:
0.7:
However, note on 0.7:
Is this related to the "fast path" of
.
in global scope cc @Keno, @vtjnash?The text was updated successfully, but these errors were encountered: