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

Reroll outer loop #30

Merged
merged 2 commits into from
May 19, 2018
Merged

Reroll outer loop #30

merged 2 commits into from
May 19, 2018

Conversation

eira-fransham
Copy link
Contributor

This improves binary size and (reportedly) speed, too

src/lib.rs Outdated
// are weird. Maybe a different version of LLVM will react differently, so if
// you see this comment in the future try deleting this assignment and using
// uninit above and see how it affects the benchmarks.
arrays[i][x] = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After loop was unrolled you don't need this anymore. This variant has the same speed for me.

Copy link
Contributor Author

@eira-fransham eira-fransham May 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic, I was really hoping I could get rid of this (as you can see from my comment).

Copy link
Contributor

@dvdplm dvdplm May 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw I tried using uninitialised memory yesterday to see if a newer compiler did anything different – it did not (well, it made the whole thing slower just like you said in the comment).

@dvdplm
Copy link
Contributor

dvdplm commented May 18, 2018

(reportedly) speed

Confirmed. :)

LGTM

@eira-fransham
Copy link
Contributor Author

@debris Can you merge this?

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

Successfully merging this pull request may close these issues.

4 participants