Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ziggurat performance comparison (julia vs. C) #1211

Closed
ViralBShah opened this issue Aug 25, 2012 · 2 comments
Closed

ziggurat performance comparison (julia vs. C) #1211

ViralBShah opened this issue Aug 25, 2012 · 2 comments
Labels
performance Must go faster

Comments

@ViralBShah
Copy link
Member

The julia implementation of the ziggurat implementation is 2x slower than the C implementation for generating 1 million normally distributed random numbers.

julia, randn_zig,30.411958694458008
c,randn_zig,16.033888
JeffBezanson added a commit that referenced this issue Nov 16, 2012
this is an optimization and also makes it easier to get callback pointers.
closes #938. sparse on Range 3x faster
helps #1211 (ziggurat), about 25% faster
helps #1169 (game of go), about 25% faster
helps #939 (sortperm), about 25% faster
helps #1163 (graph centrality) a bit, about 10% faster
@ViralBShah
Copy link
Member Author

The difference is considerably reduced now.

c,randn_zig,18.842936
julia,randn_zig,23.12302589416504

Note that I get 14ms if I use clang -O4, but that uses LTO and is probably not a fair comparison.

@StefanKarpinski
Copy link
Sponsor Member

Very nice. I'm sure we'll gradually close the gap with C on many of these sorts of things, which will be lovely for now, we're getting close enough and language features and API stability are a higher priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Must go faster
Projects
None yet
Development

No branches or pull requests

2 participants