JuliaLang/julia — comment on commit 29cb6aeaf2782630847e823bad1281aeac5e05ac
File:  line 0
By ViralBShah:

If you were writing in C, you would have to fight with RNGs. We have done a lot of hard work on finding and testing good RNGs, and all you have to do is call rand(), randi(), etc. This to me was a big advantage when I ported the code over. Of course, if you were adding this code to GSL, you would benefit from GSL's RNGs.

I also modified the C code to use dSFMT for a fair comparison. I am quite sure that C inlined large parts of dSFMT. I wonder if we would benefit from cross-language inlining, if we use clang etc. Perhaps it doesn't matter much in this case.

I like const because of the performance it provides. In C, I almost never used const, since there was very little performance gain.

-viral

On Oct 19, 2011, at 1:13 PM, Stefan Karpinski wrote:

> Even if it's slow, I love how clean and simple this code is. If we can get this working at near C speeds, it would be a huge win in terms of allowing us to port more and more code to native Julia rather than calling out to C code. Maybe it should even be a benchmark?
>
> Also, `const` really makes Julia feel like more of a "real" programming language somehow.
>
> --
> Reply to this email directly or view it on GitHub:
> https://github.com/JuliaLang/julia/commit/29cb6aeaf2782630847e823bad1281aeac5e05ac#commitcomment-661794