Skip to content

Commit

Permalink
faster rand(::MersenneTwister, ::OneTo)
Browse files Browse the repository at this point in the history
This was an oversight.
This makes rand(::MersenneTwister, ::Tuple) generally faster.
  • Loading branch information
rfourquet committed May 31, 2019
1 parent 1bd663d commit d02b695
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/Random/src/RNGs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ end
#### from a range

for T in BitInteger_types, R=(1, Inf) # eval because of ambiguity otherwise
@eval Sampler(::Type{MersenneTwister}, r::UnitRange{$T}, ::Val{$R}) =
@eval Sampler(::Type{MersenneTwister}, r::AbstractUnitRange{$T}, ::Val{$R}) =
SamplerRangeFast(r)
end

Expand Down

0 comments on commit d02b695

Please sign in to comment.