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
..
2015-05-17 11:25:17 +12:00
2015-05-15 16:04:01 -07:00
2015-05-13 14:35:53 +12:00
2015-05-15 16:04:01 -07:00
2015-05-15 16:04:01 -07:00
2015-05-15 16:04:01 -07:00
2015-05-15 16:04:01 -07:00
2015-05-15 16:04:01 -07:00
2015-05-15 16:04:01 -07:00
2015-05-15 16:04:01 -07:00
2015-05-11 15:05:57 -07:00