ASCII uppercase: add "subtract multiplied bool" benchmark
This commit is contained in:
parent
c1ec29ace0
commit
7fad370fe9
@ -224,6 +224,18 @@ fn is_ascii_lowercase(b: u8) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
is_ascii,
|
||||
|
Loading…
Reference in New Issue
Block a user