JuliaLang/julia — pull request #8958 by rfourquet (2014-11-10 10:30:56+00:00)
Title: faster rand!(::MersenneTwister, ::Array{T}) for IntTypes and Float16/32

On my machine, the following code
```
n = 10^8
m = MersenneTwister()
for T in [Int8, Int16, Int32, Int64, Int128, Float16, Float32]
tic()
rand(m, T, n÷sizeof(T))
toc()
end
```
gives on master:
```
elapsed time: 3.930758982 seconds
elapsed time: 1.971697405 seconds
elapsed time: 1.072180607 seconds
elapsed time: 1.061550883 seconds
elapsed time: 1.068857664 seconds
elapsed time: 5.118659373 seconds
elapsed time: 1.122259623 seconds
```
and with this PR:
```
elapsed time: 0.430213198 seconds
elapsed time: 0.363164584 seconds
elapsed time: 0.466962794 seconds
elapsed time: 0.440326235 seconds
elapsed time: 0.4405072 seconds
elapsed time: 2.814771324 seconds
elapsed time: 0.536492503 seconds
```