Skip to content

Commit

Permalink
add @inline so that rand(Bool) is inlined
Browse files Browse the repository at this point in the history
  • Loading branch information
jlapeyre committed Jan 5, 2015
1 parent d877d63 commit b1b9122
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/random.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ rand(r::Union(RandomDevice,MersenneTwister), ::Type{Float32}) =

# MersenneTwister

rand{T<:Union(Bool, Int8, UInt8, Int16, UInt16, Int32, UInt32)}(r::MersenneTwister, ::Type{T}) = rand_ui52_raw(r) % T
@inline rand{T<:Union(Bool, Int8, UInt8, Int16, UInt16, Int32, UInt32)}(r::MersenneTwister, ::Type{T}) = rand_ui52_raw(r) % T

function rand(r::MersenneTwister, ::Type{UInt64})
reserve(r, 2)
Expand Down

0 comments on commit b1b9122

Please sign in to comment.