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

Remove costly assert from RandIntGen #8563

Merged
merged 1 commit into from
Oct 3, 2014
Merged

Remove costly assert from RandIntGen #8563

merged 1 commit into from
Oct 3, 2014

Conversation

simonster
Copy link
Member

Restrict the type parameters instead.

Before:

julia> @time for i = 1:10000000; rand(1:4); end
elapsed time: 1.144407975 seconds (160000000 bytes allocated, 5.39% gc time)

After:

julia> @time for i = 1:10000000; rand(1:4); end
elapsed time: 0.259933851 seconds (0 bytes allocated)

cc @ivarne @rfourquet

Restrict the type parameters instead
@JeffBezanson
Copy link
Member

How did that get in there?

ivarne added a commit that referenced this pull request Oct 3, 2014
Remove costly assert from RandIntGen
@ivarne ivarne merged commit e1e47ee into master Oct 3, 2014
@kmsquire
Copy link
Member

kmsquire commented Oct 3, 2014

@ivarne, this might have been the right thing to do, but I think @JeffBezanson was considering reverting #8309 instead. (He could have been clearer about that.)

@ivarne
Copy link
Member

ivarne commented Oct 3, 2014

I read thing in the wrong order, so I didn't see it early enough. This is reverted together with #8309 in 6117328

@simonster simonster deleted the sjk/randintgen branch October 3, 2014 14:26
@rfourquet rfourquet mentioned this pull request Oct 10, 2014
@ViralBShah ViralBShah added the randomness Random number generation and the Random stdlib label Nov 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
randomness Random number generation and the Random stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants