@@ -1818,9 +1818,7 @@ impl RawTableInner {
18181818 // * Also, even if `RawTableInner` is not already allocated, `ProbeSeq.pos` will
18191819 // always return "0" (zero), so Group::load will read unaligned `Group::static_empty()`
18201820 // bytes, which is safe (see RawTableInner::new).
1821- let ctrl = unsafe { self . ctrl ( probe_seq. pos ) } ;
1822- let group = unsafe { Group :: load ( ctrl) } ;
1823- let empty = unsafe { Group :: load_and_match_empty ( ctrl) } ;
1821+ let group = unsafe { Group :: load ( self . ctrl ( probe_seq. pos ) ) } ;
18241822
18251823 for bit in group. match_tag ( tag_hash) {
18261824 let index = ( probe_seq. pos + bit) & self . bucket_mask ;
@@ -1839,7 +1837,7 @@ impl RawTableInner {
18391837 if let Some ( insert_index) = insert_index {
18401838 // Only stop the search if the group contains at least one empty element.
18411839 // Otherwise, the element that we are looking for might be in a following group.
1842- if likely ( empty . any_bit_set ( ) ) {
1840+ if likely ( group . match_empty ( ) . any_bit_set ( ) ) {
18431841 // We must have found a insert slot by now, since the current group contains at
18441842 // least one. For tables smaller than the group width, there will still be an
18451843 // empty element in the current (and only) group due to the load factor.
@@ -2026,13 +2024,7 @@ impl RawTableInner {
20262024 // * Also, even if `RawTableInner` is not already allocated, `ProbeSeq.pos` will
20272025 // always return "0" (zero), so Group::load will read unaligned `Group::static_empty()`
20282026 // bytes, which is safe (see RawTableInner::new_in).
2029- let ctrl = unsafe { self . ctrl ( probe_seq. pos ) } ;
2030- let group = unsafe { Group :: load ( ctrl) } ;
2031-
2032- // Compute the empty check early so it can execute in parallel
2033- // with the tag comparison. On some backends this uses a
2034- // separate code path optimized for the empty check.
2035- let empty = unsafe { Group :: load_and_match_empty ( ctrl) } ;
2027+ let group = unsafe { Group :: load ( self . ctrl ( probe_seq. pos ) ) } ;
20362028
20372029 for bit in group. match_tag ( tag_hash) {
20382030 // This is the same as `(probe_seq.pos + bit) % self.num_buckets()` because the number
@@ -2044,7 +2036,7 @@ impl RawTableInner {
20442036 }
20452037 }
20462038
2047- if likely ( empty . any_bit_set ( ) ) {
2039+ if likely ( group . match_empty ( ) . any_bit_set ( ) ) {
20482040 return None ;
20492041 }
20502042
0 commit comments