Skip to content

Don't zero the array on initialization #43

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

Merged
merged 1 commit into from
Mar 22, 2017
Merged

Conversation

mbrubeck
Copy link
Collaborator

@mbrubeck mbrubeck commented Mar 22, 2017

Using mem::uninitialized is potentially faster than mem::zeroed, and doesn't remove any safety (since both uninitialized memory and zeroed memory are unsafe to read from in general).


This change is Reviewable

Using `mem::uninitialized` is potentially faster than `mem::zeroed`, and
doesn't remove any safety (since both uninitialized memory and zeroed
memory are unsafe to read from in general).
@jdm
Copy link
Member

jdm commented Mar 22, 2017

@bors-servo: r+

@bors-servo
Copy link
Contributor

📌 Commit 4ba8345 has been approved by jdm

@bors-servo
Copy link
Contributor

⌛ Testing commit 4ba8345 with merge e4b459e...

bors-servo pushed a commit that referenced this pull request Mar 22, 2017
Don't zero the array on initialization

Using `mem::uninitialized` is potentially faster than `mem::zeroed`, and doesn't remove any safety (since both uninitialized memory and zeroed memory are unsafe to read from in general).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/43)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - status-travis

@mbrubeck
Copy link
Collaborator Author

@bors-servo
Copy link
Contributor

⌛ Testing commit 4ba8345 with merge ce94fc6...

bors-servo pushed a commit that referenced this pull request Mar 22, 2017
Don't zero the array on initialization

Using `mem::uninitialized` is potentially faster than `mem::zeroed`, and doesn't remove any safety (since both uninitialized memory and zeroed memory are unsafe to read from in general).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/43)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - status-travis
Approved by: jdm
Pushing ce94fc6 to master...

@bors-servo bors-servo merged commit 4ba8345 into servo:master Mar 22, 2017
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.

3 participants