How does rand get faster? I would think rand would be so well explored that all mature languages reuse the same implementation. Is it written in C or assembly, or does it ccall, or is it written in Julia itself?
julia> @which randn(1000)
randn(dims::Integer...) in Random at ~/Software/Julia/share/julia/stdlib/v1.5/Random/src/normal.jl:210
julia> @edit randn(1000)
# Opens the normal.jl file in your editor
julia> @run randn(1000)
# Starts the debugger in VSCode
Digging deeper, at least one of the PRs [1] is based on a 2018 paper [2][1] https://github.com/JuliaLang/julia/pull/29240 [2] https://arxiv.org/abs/1805.10941
On the contrary, random number generation has no general solution and remains an active area of research in many fields that depend on it.