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

add @inline so that rand(Bool) is inlined #9626

Merged
merged 1 commit into from
Jan 5, 2015
Merged

add @inline so that rand(Bool) is inlined #9626

merged 1 commit into from
Jan 5, 2015

Conversation

jlapeyre
Copy link
Contributor

@jlapeyre jlapeyre commented Jan 5, 2015

rand(Bool) in v0.4 about 2x slower than randbool() in v0.3 when called repeatedly in a loop.

After adding this @inline macro call, I can no longer detect a significant difference in speed between
randbool() in v0.3 and rand(Bool) in v0.4.

@ViralBShah
Copy link
Member

Thanks!

@ViralBShah ViralBShah added domain:randomness Random number generation and the Random stdlib performance Must go faster backport pending and removed backport pending labels Jan 5, 2015
ViralBShah pushed a commit that referenced this pull request Jan 5, 2015
add @inline so that rand(Bool) is inlined
@ViralBShah ViralBShah merged commit dab6b5e into JuliaLang:master Jan 5, 2015
@ivarne
Copy link
Sponsor Member

ivarne commented Jan 5, 2015

CC: @rfourquet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:randomness Random number generation and the Random stdlib performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants