Skip to content

Commit 93ba7fe

Browse files
Markus WesterlindMarwes
authored andcommitted
Finish up into something that does not regress performance
1 parent e04c18d commit 93ba7fe

File tree

6 files changed

+242
-287
lines changed

6 files changed

+242
-287
lines changed

benches/bench.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ macro_rules! bench_insert {
8686
b.iter(|| {
8787
m.clear();
8888
for i in ($keydist).take(SIZE) {
89-
m.insert(i, DropType(i));
89+
m.insert(i, (DropType(i), [i; 20]));
9090
}
9191
black_box(&mut m);
9292
});
@@ -112,7 +112,7 @@ macro_rules! bench_grow_insert {
112112
b.iter(|| {
113113
let mut m = $maptype::default();
114114
for i in ($keydist).take(SIZE) {
115-
m.insert(i, i);
115+
m.insert(i, DropType(i));
116116
}
117117
black_box(&mut m);
118118
})

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ pub mod raw {
5757
pub use inner::*;
5858

5959
#[cfg(feature = "rayon")]
60+
/// [rayon]-based parallel iterator types for hash maps.
61+
/// You will rarely need to interact with it directly unless you have need
62+
/// to name one of the iterator types.
63+
///
64+
/// [rayon]: https://docs.rs/rayon/1.0/rayon
6065
pub mod rayon {
6166
pub use crate::external_trait_impls::rayon::raw::*;
6267
}

src/main.rs

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/raw/bitmask.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,6 @@ impl BitMask {
6161
}
6262
}
6363

64-
#[inline]
65-
pub fn take_next_bit(&mut self) -> Option<usize> {
66-
if let Some(index) = self.lowest_set_bit() {
67-
*self = self.remove_lowest_bit();
68-
Some(index)
69-
} else {
70-
None
71-
}
72-
}
73-
7464
/// Returns the first set bit in the `BitMask`, if there is one. The
7565
/// bitmask must not be empty.
7666
#[inline]

0 commit comments

Comments
 (0)