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 mutable-value iterators to std::trie #11342

Merged
merged 6 commits into from
Jan 7, 2014
Merged

Conversation

huonw
Copy link
Member

@huonw huonw commented Jan 6, 2014

  • Add mut_iter, mut_lower_bound, mut_upper_bound
  • Remove some internal iterators
  • Add benchmarks
  • Improve performance of {mut_,}{lower,upper}_bound
  • Minor clean-up of extra::treemap after I realised I wasn't exploiting macros to their full DRY potential.

huonw added 6 commits January 8, 2014 00:31
I believe this is mainly due to code-size reduction.

Before:

    test [...]::bench_lower_bound ... bench:       818 ns/iter (+/- 100)
    test [...]::bench_upper_bound ... bench:       939 ns/iter (+/- 34)

After:

    test [...]::bench_lower_bound ... bench:       698 ns/iter (+/- 60)
    test [...]::bench_upper_bound ... bench:       817 ns/iter (+/- 20)
iterator macro properly hygiene.

Requires less repetition of `mut` or not too.
bors added a commit that referenced this pull request Jan 7, 2014
- Add `mut_iter`, `mut_lower_bound`, `mut_upper_bound`
- Remove some internal iterators
- Add benchmarks
- Improve performance of `{mut_,}{lower,upper}_bound`
- Minor clean-up of `extra::treemap` after I realised I wasn't exploiting macros to their full DRY potential.
@bors bors closed this Jan 7, 2014
@bors bors merged commit 167d533 into rust-lang:master Jan 7, 2014
@huonw huonw deleted the trie-mut branch February 25, 2014 05:28
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.

2 participants