<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/liballoc/tests/btree, branch perf-tmp</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-07-28T00:51:13+00:00</updated>
<entry>
<title>mv std libs to library/</title>
<updated>2020-07-28T00:51:13+00:00</updated>
<author>
<name>mark</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2020-06-12T02:31:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2c31b45ae878b821975c4ebd94cc1e49f6073fd0'/>
<id>urn:sha1:2c31b45ae878b821975c4ebd94cc1e49f6073fd0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #74677 - ssomers:btree_cleanup_2, r=Amanieu</title>
<updated>2020-07-24T09:56:38+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>huyuumi.dev@gmail.com</email>
</author>
<published>2020-07-24T09:56:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fab9b1d4cd5a788f46d94077b49da285ce782b74'/>
<id>urn:sha1:fab9b1d4cd5a788f46d94077b49da285ce782b74</id>
<content type='text'>
Remove needless unsafety from BTreeMap::drain_filter

Remove one piece of unsafe code in the iteration over the iterator returned by BTreeMap::drain_filter.
- Changes an explicitly unspecified part of the API: when the user-supplied predicate (or some of BTreeMap's code) panicked, and the caller tries to use the iterator again, we no longer offer the same key/value pair to the predicate again but pretend the iterator has finished. Note that Miri does not find UB in the test case added here with the unsafe code (or without).
- Makes the code a little easier on the eyes.
- Makes the code a little harder on the CPU:
```
benchcmp c0 c2 --threshold 3
 name                                         c0 ns/iter  c2 ns/iter  diff ns/iter  diff %  speedup
 btree::set::clone_100_and_drain_all          2,794       2,900                106   3.79%   x 0.96
 btree::set::clone_100_and_drain_half         2,604       2,964                360  13.82%   x 0.88
 btree::set::clone_10k_and_drain_half         287,770     322,755           34,985  12.16%   x 0.89
```
r? @Amanieu
</content>
</entry>
<entry>
<title>BTreeMap::drain_filter: replace needless unsafety and test</title>
<updated>2020-07-23T16:29:07+00:00</updated>
<author>
<name>Stein Somers</name>
<email>git@steinsomers.be</email>
</author>
<published>2020-07-22T20:37:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=facc46fd0a85408bc05aa19b80131e3cfb5fe3dd'/>
<id>urn:sha1:facc46fd0a85408bc05aa19b80131e3cfb5fe3dd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>More BTreeMap test cases, some exposing undefined behaviour</title>
<updated>2020-07-22T21:40:06+00:00</updated>
<author>
<name>Stein Somers</name>
<email>git@steinsomers.be</email>
</author>
<published>2020-07-14T09:32:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2152d18f9248d376fd43a6192888664f33dfb08d'/>
<id>urn:sha1:2152d18f9248d376fd43a6192888664f33dfb08d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>disable BTree min_max test in Miri for now</title>
<updated>2020-07-02T08:26:37+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2020-07-02T08:25:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dca9310ceb495ae2d5c6c775c151d75202e686d7'/>
<id>urn:sha1:dca9310ceb495ae2d5c6c775c151d75202e686d7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Shortcuts for min/max on ordinary BTreeMap/BTreeSet iterators</title>
<updated>2020-06-26T08:05:21+00:00</updated>
<author>
<name>Stein Somers</name>
<email>git@steinsomers.be</email>
</author>
<published>2020-06-22T18:12:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=42062a58026cdb245e3eb365af726f2d9f4946af'/>
<id>urn:sha1:42062a58026cdb245e3eb365af726f2d9f4946af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>liballoc: more compact way to adjust test sizes for Miri</title>
<updated>2020-04-23T18:05:01+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2020-04-23T18:05:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=eb1de2ff39de631e9fd880f1e066fbe119b23f99'/>
<id>urn:sha1:eb1de2ff39de631e9fd880f1e066fbe119b23f99</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use usize::MAX as assoc const in liballoc</title>
<updated>2020-04-06T21:07:38+00:00</updated>
<author>
<name>Linus Färnstrand</name>
<email>faern@faern.net</email>
</author>
<published>2020-04-06T21:07:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e4fc04b6df93785e935ec776705803e6b50e2c23'/>
<id>urn:sha1:e4fc04b6df93785e935ec776705803e6b50e2c23</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #68770 - ssomers:btree_drain_filter, r=Amanieu</title>
<updated>2020-03-31T22:27:18+00:00</updated>
<author>
<name>Dylan DPC</name>
<email>dylan.dpc@gmail.com</email>
</author>
<published>2020-03-31T22:27:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=718ba0d23bc13cd987acbb1b2286552eeee88a1d'/>
<id>urn:sha1:718ba0d23bc13cd987acbb1b2286552eeee88a1d</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>fix BTreeMap test compilation with Miri</title>
<updated>2020-03-30T10:04:05+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2020-03-30T10:03:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=032d3cd553ec503a4483c8ef1f2a8d773775a3f2'/>
<id>urn:sha1:032d3cd553ec503a4483c8ef1f2a8d773775a3f2</id>
<content type='text'>
</content>
</entry>
</feed>
