ASCII uppercase: add "subtract multiplied bool" benchmark
This commit is contained in:
parent
c1ec29ace0
commit
7fad370fe9
1 changed files with 12 additions and 0 deletions
|
@ -224,6 +224,18 @@ benches! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn case14_subtract_multiplied_bool_match_range(bytes: &mut [u8]) {
|
||||||
|
fn is_ascii_lowercase(b: u8) -> bool {
|
||||||
|
match b {
|
||||||
|
b'a'...b'z' => true,
|
||||||
|
_ => false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for byte in bytes {
|
||||||
|
*byte -= (b'a' - b'A') * is_ascii_lowercase(*byte) as u8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@iter
|
@iter
|
||||||
|
|
||||||
is_ascii,
|
is_ascii,
|
||||||
|
|
Loading…
Reference in a new issue