Casting a positive i8 through u8 is slightly faster

This commit is contained in:
Paul Dicker 2024-02-13 16:31:43 +01:00 committed by Paul Dicker
parent 6eec070603
commit e3ff4bc1d2

View File

@ -327,7 +327,7 @@ impl Mdf {
let mdl = self.0 >> 3;
match MDL_TO_OL[mdl as usize] {
XX => None,
v => Some((mdl - v as i32 as u32) >> 1),
v => Some((mdl - v as u8 as u32) >> 1),
}
}