Closed haampie closed 3 years ago
The hoisting of the default RNG is #36418.
Ah. So let me remove the bit about sim_simpler!
, since that's handled elsewhere already :)
Looks like this improved in 1.6 and yet again on 1.7-DEV (likely due to xoroshiro #40546 in the second case):
julia-1.4> @btime sim!($(rand(1000)), 10^5)
1.171 ms (0 allocations: 0 bytes)
julia-1.5> @btime sim!($(rand(1000)), 10^5)
1.361 ms (0 allocations: 0 bytes)
julia-1.6> @btime sim!($(rand(1000)), 10^5)
827.056 μs (0 allocations: 0 bytes)
julia-1.7> @btime sim!($(rand(1000)), 10^5)
697.995 μs (0 allocations: 0 bytes)
This came up in the julia slack channel, via https://twitter.com/genkuroki/status/1293558651588767750. Disregarding the type instability from their benchmark, there seems to be a true regression
Julia 1.4.1:
Julia 1.5.0:
around 10% difference.
Finally, it does seem like
rand
is actually faster on Julia 1.5.0:so it's a bit confusing why
sim!
is slower on Julia 1.5.0.