Skip to content

Commit 12e8bb9

Browse files
bors[bot]cuviper
andcommitted
64: Inline non-nightly lowest_set_bit_nonzero r=Amanieu a=cuviper I was surprised to see this tiny function show up in my performance profile on its own. The nightly version of this function was already marked `#[inline]`, but the non-nightly version should be inlined too. Co-authored-by: Josh Stone <[email protected]>
2 parents a657af5 + 79c5b41 commit 12e8bb9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/raw/bitmask.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ impl BitMask {
5454
pub unsafe fn lowest_set_bit_nonzero(self) -> usize {
5555
intrinsics::cttz_nonzero(self.0) as usize / BITMASK_STRIDE
5656
}
57+
#[inline]
5758
#[cfg(not(feature = "nightly"))]
5859
pub unsafe fn lowest_set_bit_nonzero(self) -> usize {
5960
self.trailing_zeros()

0 commit comments

Comments
 (0)