JuliaStats/Distributions.jl — pull request #22 by andreasnoackjensen (2013-02-26 20:08:43+00:00)
Title: Dirichlet speedup

As a response to #18. The main problem here is that each call to the gamma rng has some setup costs and the fall back method for sampling is completely devectorized. If the gamma variates are returned as vectors it is much faster. On my machine this version is faster than Scipy and maybe it can be made faster. Please check the code before merging. I rarely use the Dirichlet so I haven't tested it thoroughly.