JuliaLang/julia — pull request #5444 by lindahua (2014-01-18 15:44:10+00:00)
Title: Improved implementation of random number generation within a range

- Introduce a ``RandIntGen`` type which caches the value of ``div(typemax(T), k) * k``.
- ``rand!(r, a)`` now relies on ``RandIntGen``, which avoids repeated computation of the cached value.
- Full coverage of most integer types