| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-04-09 | Kill comment left behind by a last minute change in #70795 | Stein Somers | -2/+0 | |
| 2020-04-08 | Rollup merge of #70930 - lcnr:patch-1, r=Dylan-DPC | Dylan DPC | -1/+1 | |
| add tracking issue to `VecDeque::make_contiguous` The tracking issue is https://github.com/rust-lang/rust/issues/70929 | ||||
| 2020-04-08 | add `VecDeque::make_contiguous` tracking issue | Bastian Kauschke | -1/+1 | |
| 2020-04-06 | BTreeMap first/last: add pop methods | Stein Somers | -0/+48 | |
| 2020-04-06 | BTreeMap first/last: make examples more to the point | Stein Somers | -10/+12 | |
| 2020-04-06 | BTreeMap first/last: simplify implementations | Stein Somers | -38/+16 | |
| 2020-04-06 | Remove the Ord bound that was plaguing drain_filter, and superfluous lifetimes | Stein Somers | -45/+21 | |
| 2020-04-05 | Rollup merge of #70795 - Amanieu:btree_remove_tracking, r=Mark-Simulacrum | Dylan DPC | -49/+64 | |
| Keep track of position when deleting from a BTreeMap This improves the performance of drain_filter and is needed for future Cursor support for BTreeMap. cc @ssomers r? @Mark-Simulacrum | ||||
| 2020-04-05 | Rollup merge of #70777 - faern:use-assoc-int-consts2, r=dtolnay | Dylan DPC | -1/+0 | |
| Don't import integer and float modules, use assoc consts Stop importing the standard library integer and float modules to reach the `MIN`, `MAX` and other constants. They are available directly on the primitive types now. This PR is a follow up of #69860 which made sure we use the new constants in documentation. This type of change touches a lot of files, and previously all my assoc int consts PRs had collisions and were accepted only after a long delay. So I'd prefer to do it in smaller steps now. Just removing these imports seem like a good next step. r? @dtolnay | ||||
| 2020-04-05 | Apply review feedback | Amanieu d'Antras | -15/+10 | |
| 2020-04-05 | Keep track of position when deleting from a BTreeMap | Amanieu d'Antras | -39/+59 | |
| This improves the performance of drain_filter and is needed for future Cursor support for BTreeMap. | ||||
| 2020-04-05 | Stop importing integer modules in liballoc | Linus Färnstrand | -1/+0 | |
| 2020-04-04 | use ManuallyDrop instead of forget inside collections | Trevor Spiteri | -14/+13 | |
| This commit changes some usage of mem::forget into mem::ManuallyDrop in some Vec, VecDeque, BTreeMap and Box methods. Before the commit, the generated IR for some of the methods was longer, and even after optimization, some unwinding artifacts were still present. | ||||
| 2020-04-02 | stabilize BTreeMap::remove_entry | DutchGhost | -2/+1 | |
| 2020-04-02 | Auto merge of #70362 - TimDiekmann:alloc-overhaul, r=Amanieu | bors | -4/+5 | |
| Overhaul of the `AllocRef` trait to match allocator-wg's latest consens; Take 2 GitHub won't let me reopen #69889 so I make a new PR. In addition to #69889 this fixes the unsoundness of `RawVec::into_box` when using allocators supporting overallocating. Also it uses `MemoryBlock` in `AllocRef` to unify `_in_place` methods by passing `&mut MemoryBlock`. Additionally, `RawVec` now checks for `size_of::<T>()` again and ignore every ZST. The internal capacity of `RawVec` isn't used by ZSTs anymore, as `into_box` now requires a length to be specified. r? @Amanieu fixes rust-lang/wg-allocators#38 fixes rust-lang/wg-allocators#41 fixes rust-lang/wg-allocators#44 fixes rust-lang/wg-allocators#51 | ||||
| 2020-04-01 | Rollup merge of #68770 - ssomers:btree_drain_filter, r=Amanieu | Dylan DPC | -13/+298 | |
| BTreeMap/BTreeSet: implement drain_filter Provide an implementation of drain_filter for BTreeMap and BTreeSet. Should be optimal when the predicate picks only elements in leaf nodes with at least MIN_LEN remaining elements, which is a common case, at least when draining only a fraction of the map/set, and also when the predicate picks elements stored in internal nodes where the right subtree can easily let go of a replacement element. The first commit adds benchmarks with an external, naive implementation. to compare how much this claimed optimality-in-some-cases is actually worth. | ||||
| 2020-03-31 | Rollup merge of #69425 - lcnr:make_contiguous, r=Amanieu | Dylan DPC | -53/+235 | |
| add fn make_contiguous to VecDeque Adds the following method to VecDeque: ```rust pub fn make_contiguous(&mut self) -> &mut [T]; ``` Taken from https://github.com/rust-lang/rust/pull/69400, after a suggestion by @CryZe https://github.com/rust-lang/rust/pull/69400#issuecomment-590216089 I am in favor of merging this instead of https://github.com/rust-lang/rust/pull/69400. | ||||
| 2020-03-31 | fix docs | Bastian Kauschke | -1/+1 | |
| 2020-03-31 | update `VecDeque::as_(mut)_slice` docs | Bastian Kauschke | -4/+4 | |
| 2020-03-29 | BTreeMap/BTreeSet: implement and test drain_filter | Stein Somers | -13/+298 | |
| 2020-03-26 | Remove alignment from `MemoryBlock` | Tim Diekmann | -8/+4 | |
| 2020-03-26 | Fix issues from review and unsoundness of `RawVec::into_box` | Tim Diekmann | -7/+12 | |
| 2020-03-24 | must_use on split_off | Kornel | -0/+1 | |
| #70194 | ||||
| 2020-03-22 | update `make_contiguous` docs | Bastian Kauschke | -1/+3 | |
| Co-Authored-By: Amanieu d'Antras <amanieu@gmail.com> | ||||
| 2020-03-22 | document invariant of `VecDeque::as_(mut)_slice` | Bastian Kauschke | -0/+6 | |
| 2020-03-22 | remove redundant closures (clippy::redundant_closure) | Matthias Krüger | -2/+2 | |
| 2020-03-22 | add `fn make_contiguous` to VecDeque | Bastian Kauschke | -53/+227 | |
| 2020-03-20 | Simplify ensure_root_is_owned callers | Mark Rousskov | -15/+13 | |
| This makes ensure_root_is_owned return a reference to the (now guaranteed to exist) root, allowing callers to operate on it without going through another unwrap. Unfortunately this is only rarely useful as it's frequently the case that both the length and the root need to be accessed and field-level borrows in methods don't yet exist. | ||||
| 2020-03-20 | Drop NodeHeader type from BTree code | Mark Rousskov | -41/+5 | |
| We no longer have a separate header because the shared root is gone; all code can work solely with leafs now. | ||||
| 2020-03-20 | Make functions dependent only on shared root avoidance safe | Mark Rousskov | -58/+58 | |
| 2020-03-20 | Remove shared root code and assertions from BTree nodes | Mark Rousskov | -59/+8 | |
| 2020-03-20 | Replace shared root with optional root | Mark Rousskov | -77/+112 | |
| This simplifies the node manipulation, as we can (in later commits) always know when traversing nodes that we are not in a shared root. | ||||
| 2020-03-14 | Rollup merge of #69809 - matthiaskrgr:lifetimes, r=eddyb | Yuki Okushi | -1/+1 | |
| remove lifetimes that can be elided (clippy::needless_lifetimes) | ||||
| 2020-03-12 | remove lifetimes that can be elided (clippy::needless_lifetimes) | Matthias Krüger | -1/+1 | |
| 2020-03-12 | Rollup merge of #69792 - LenaWil:try_reserve_error/impl-error, r=sfackler | Mazdak Farrokhzad | -0/+18 | |
| Implement Error for TryReserveError I noticed that the Error trait wasn't implemented for TryReserveError. (#48043) Not sure if the error messages and code style are 100% correct, it's my first time contributing to the Rust std. | ||||
| 2020-03-11 | Reformat match statement to make the check pass | Lena Wildervanck | -3/+1 | |
| 2020-03-11 | Format the match statement | Lena Wildervanck | -3/+6 | |
| 2020-03-08 | Rollup merge of #69668 - ssomers:btreemap_even_more_comments, r=Mark-Simulacrum | Mazdak Farrokhzad | -14/+19 | |
| More documentation and simplification of BTreeMap's internals Salvage the documentation and simplification from #67980, without changing the type locked down by debuginfo. r? @rkruppe | ||||
| 2020-03-08 | Rollup merge of #69776 - ssomers:fix69769, r=Mark-Simulacrum | Mazdak Farrokhzad | -1/+10 | |
| Fix & test leak of some BTreeMap nodes on panic during `into_iter` Fixes #69769 | ||||
| 2020-03-07 | Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkov | Mazdak Farrokhzad | -5/+5 | |
| fix various typos | ||||
| 2020-03-07 | Implement Error for TryReserveError | Lena Wildervanck | -0/+17 | |
| 2020-03-06 | Don't redundantly repeat field names (clippy::redundant_field_names) | Matthias Krüger | -1/+1 | |
| 2020-03-06 | fix various typos | Matthias Krüger | -5/+5 | |
| 2020-03-06 | Fix & test leak of some BTreeMap nodes on panic during `into_iter` | Stein Somers | -1/+10 | |
| 2020-03-04 | Documentation and slight simplification of BTreeMap's internals | Stein Somers | -14/+19 | |
| 2020-03-03 | Simplify conditions like x + 1 <= y to x < y | Matthias Krüger | -1/+1 | |
| 2020-02-29 | simplify boolean expressions | Matthias Krüger | -2/+2 | |
| 2020-02-28 | Auto merge of #68827 - ssomers:btree_navigation_revisited, r=Mark-Simulacrum | bors | -150/+148 | |
| BTreeMap navigation done safer & faster It turns out that there was a faster way to do the tree navigation code bundled in #67073, by moving from edge to KV and from KV to next edge separately. It extracts most of the code as safe functions, and contains the duplication of handles within the short wrapper functions. This somehow hits a sweet spot in the compiler because it reports boosts all over the board: ``` >cargo benchcmp pre3.txt posz4.txt --threshold 5 name pre3.txt ns/iter posz4.txt ns/iter diff ns/iter diff % speedup btree::map::first_and_last_0 40 37 -3 -7.50% x 1.08 btree::map::first_and_last_100 58 44 -14 -24.14% x 1.32 btree::map::iter_1000 8,920 3,419 -5,501 -61.67% x 2.61 btree::map::iter_100000 1,069,290 411,615 -657,675 -61.51% x 2.60 btree::map::iter_20 169 58 -111 -65.68% x 2.91 btree::map::iter_mut_1000 8,701 3,303 -5,398 -62.04% x 2.63 btree::map::iter_mut_100000 1,034,560 405,975 -628,585 -60.76% x 2.55 btree::map::iter_mut_20 165 58 -107 -64.85% x 2.84 btree::set::clone_100 1,831 1,562 -269 -14.69% x 1.17 btree::set::clone_100_and_clear 1,831 1,565 -266 -14.53% x 1.17 btree::set::clone_100_and_into_iter 1,917 1,541 -376 -19.61% x 1.24 btree::set::clone_100_and_pop_all 2,609 2,441 -168 -6.44% x 1.07 btree::set::clone_100_and_remove_all 4,598 3,927 -671 -14.59% x 1.17 btree::set::clone_100_and_remove_half 2,765 2,551 -214 -7.74% x 1.08 btree::set::clone_10k 191,610 164,616 -26,994 -14.09% x 1.16 btree::set::clone_10k_and_clear 192,003 164,616 -27,387 -14.26% x 1.17 btree::set::clone_10k_and_into_iter 200,037 163,010 -37,027 -18.51% x 1.23 btree::set::clone_10k_and_pop_all 267,023 250,913 -16,110 -6.03% x 1.06 btree::set::clone_10k_and_remove_all 536,230 464,100 -72,130 -13.45% x 1.16 btree::set::clone_10k_and_remove_half 453,350 430,545 -22,805 -5.03% x 1.05 btree::set::difference_random_100_vs_100 1,787 801 -986 -55.18% x 2.23 btree::set::difference_random_100_vs_10k 2,978 2,696 -282 -9.47% x 1.10 btree::set::difference_random_10k_vs_100 111,075 54,734 -56,341 -50.72% x 2.03 btree::set::difference_random_10k_vs_10k 246,380 175,980 -70,400 -28.57% x 1.40 btree::set::difference_staggered_100_vs_100 1,789 951 -838 -46.84% x 1.88 btree::set::difference_staggered_100_vs_10k 2,798 2,606 -192 -6.86% x 1.07 btree::set::difference_staggered_10k_vs_10k 176,452 97,401 -79,051 -44.80% x 1.81 btree::set::intersection_100_neg_vs_10k_pos 34 32 -2 -5.88% x 1.06 btree::set::intersection_100_pos_vs_100_neg 30 27 -3 -10.00% x 1.11 btree::set::intersection_random_100_vs_100 1,537 613 -924 -60.12% x 2.51 btree::set::intersection_random_100_vs_10k 2,793 2,649 -144 -5.16% x 1.05 btree::set::intersection_random_10k_vs_10k 222,127 147,166 -74,961 -33.75% x 1.51 btree::set::intersection_staggered_100_vs_100 1,447 622 -825 -57.01% x 2.33 btree::set::intersection_staggered_100_vs_10k 2,606 2,382 -224 -8.60% x 1.09 btree::set::intersection_staggered_10k_vs_10k 143,620 58,790 -84,830 -59.07% x 2.44 btree::set::is_subset_100_vs_100 1,349 488 -861 -63.83% x 2.76 btree::set::is_subset_100_vs_10k 1,720 1,428 -292 -16.98% x 1.20 btree::set::is_subset_10k_vs_10k 135,984 48,527 -87,457 -64.31% x 2.80 ``` The `first_and_last` ones are noise (they don't do iteration), the others seem genuine. As always, approved by Miri. Also, a separate commit with some more benchmarks of mutable behaviour (which also benefit). r? @cuviper | ||||
| 2020-02-28 | Make implementation of navigation simpler, safer and faster | Stein Somers | -150/+148 | |
| 2020-02-28 | Fix and test implementation of BTreeMap's first_entry, last_entry, ↵ | Stein Somers | -10/+14 | |
| pop_first, pop_last | ||||
