Skip to content

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