rust/src/libcollections
bors 4daa62a55f Auto merge of #25230 - rayglover:patch-bitset, r=Gankro
Some modest running-time improvements to `std::collections::BitSet` on bit-sets of varying set-membership densities. This is work originally from [here](https://github.com/rayglover/alt_collections). (Benchmarks copied below)
```
std::collections::BitSet / alt_collections::BitSet

copy_dense         ... 3.08x
copy_sparse        ... 4.22x
count_dense        ... 11.01x
count_sparse       ... 8.11x
from_bytes         ... 1.47x
intersect_dense    ... 6.54x
intersect_sparse   ... 4.37x
union_dense        ... 5.53x
union_sparse       ... 5.60x
```

The exception is `from_bytes`, which I've left unaltered since the optimization is rather obscure.

Compiling with the cpu feature `popcnt` gave a further ~10% improvement on my machine, but this wasn't factored in to the benchmarks above.

Similar improvements could be made to `BitVec`, although that would probably require more substantial changes.

criticism welcome!
2015-05-18 19:54:24 +00:00
..
btree Allow for better optimizations of iterators for zero-sized types 2015-05-15 15:30:22 +02:00
binary_heap.rs
bit.rs Auto merge of #25230 - rayglover:patch-bitset, r=Gankro 2015-05-18 19:54:24 +00:00
borrow.rs Allow ?Sized types in Rc’s impls of {Partial,}{Ord,Eq} and Borrow 2015-05-16 11:01:52 +12:00
enum_set.rs
fmt.rs Clarify intention wrt integers 2015-04-30 17:43:46 -04:00
lib.rs libs: Move favicon URLs to HTTPS 2015-05-15 16:04:01 -07:00
linked_list.rs Register new snapshots 2015-04-28 17:23:45 -07:00
macros.rs
range.rs
slice.rs docs: Update SliceConcatExt docs for assoc types 2015-05-11 03:43:04 +02:00
str.rs Add #[inline] to Borrow<str>::borrow for String. 2015-05-14 20:54:02 +02:00
string.rs Fixed reserve_exact example 2015-05-16 20:59:20 -03:00
vec_deque.rs Implement retain for vec_deque 2015-05-04 23:04:06 -04:00
vec_map.rs Minor optimization for VecMap::split_off 2015-05-11 12:54:59 +02:00
vec.rs Allow for better optimizations of iterators for zero-sized types 2015-05-15 15:30:22 +02:00