-
-
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
Regression: e.g. rand(100) a little slower #30529
Comments
julia> versioninfo()
Julia Version 1.0.3
Commit 099e826241 (2018-12-18 01:34 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, broadwell)
julia> @btime rand(1);
48.178 ns (1 allocation: 96 bytes)
julia> @btime rand(1);
48.380 ns (1 allocation: 96 bytes)
julia> @btime rand(10);
61.366 ns (1 allocation: 160 bytes)
julia> @btime rand(100);
349.239 ns (1 allocation: 896 bytes)
julia> @btime rand(100);
333.566 ns (1 allocation: 896 bytes)
julia> @btime rand();
5.300 ns (0 allocations: 0 bytes)
julia> @btime rand();
5.300 ns (0 allocations: 0 bytes)
julia> julia> versioninfo()
Julia Version 0.7.0
Commit a4cb80f3ed (2018-08-08 06:46 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, broadwell)
julia> @btime rand(1);
91.113 ns (1 allocation: 96 bytes)
julia> @btime rand(1);
91.488 ns (1 allocation: 96 bytes)
julia> @btime rand(10);
114.753 ns (1 allocation: 160 bytes)
julia> @btime rand(100);
355.185 ns (1 allocation: 896 bytes)
julia> @btime rand(100);
202.945 ns (1 allocation: 896 bytes)
julia> @btime rand();
10.009 ns (0 allocations: 0 bytes)
julia> @btime rand();
9.009 ns (0 allocations: 0 bytes)
julia> |
No regression.
rand(1) takes 58-59 ns in both setups. I can't add BenchmarkTools to 0.5.2. I can add it to 1.0+. Why some actions continue to use proxies despite system-wide tweaks performed? |
I benchmarked 0.6 and 1.0.3. I note that |
rand() is a bit faster on Julia 1.2, so that's a good thing, while rand(1) up to rand(100) is slower, so it may be regarding allocation[s], not be about rand?
First Julia 1.2 (yes, my laptop is a bit loaded (with Firefox running) and is very old, can anyone replicate on recent hardware?):
Older Julia:
Then this form is faster for Julia 1.2 (and a bit faster than same for Julia 0.5, so I think I confimed not really about rand):
The text was updated successfully, but these errors were encountered: