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

stop zeroing exchange heap allocations and some other more minor allocations #4938

Merged
merged 5 commits into from
Feb 15, 2013
Merged

stop zeroing exchange heap allocations and some other more minor allocations #4938

merged 5 commits into from
Feb 15, 2013

Conversation

thestinger
Copy link
Contributor

I removed the unused wrappers methods named calloc because they relied on the malloc wrapper having a bool zero = true default parameter (which resulted in some accidental zeroing). Perhaps wrapping the actual calloc function would be useful, but I don't know of an existing use case that could use it so I just removed these.

This gives an ~1% performance improvement for TreeMap, which does a lot of small allocations. Vectors use realloc which didn't zero before these changes so there's no measurable change in performance.

@brson
Copy link
Contributor

brson commented Feb 15, 2013

Awesome. I love seeing bits of rt evaporate.

bors added a commit that referenced this pull request Feb 15, 2013
I removed the unused wrappers methods named `calloc` because they relied on the malloc wrapper having a `bool zero = true` default parameter (which resulted in some accidental zeroing). Perhaps wrapping the actual calloc function would be useful, but I don't know of an existing use case that could use it so I just removed these.

This gives an ~1% performance improvement for TreeMap, which does a lot of small allocations. Vectors use `realloc` which didn't zero before these changes so there's no measurable change in performance.
@bors bors closed this Feb 15, 2013
@bors bors merged commit 1a41b48 into rust-lang:incoming Feb 15, 2013
brson added a commit to brson/rust that referenced this pull request Feb 20, 2013
This reverts commit 20fd0c5, reversing
changes made to af2f0ef.

Conflicts:
	src/libstd/uv_ll.rs
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