ASCII uppercase: add "subtract shifted bool" benchmark
This commit is contained in:
parent
0ad91f73d9
commit
c1ec29ace0
1 changed files with 12 additions and 0 deletions
|
|
@ -212,6 +212,18 @@ benches! {
|
|||
}
|
||||
}
|
||||
|
||||
fn case13_subtract_shifted_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 -= (is_ascii_lowercase(*byte) as u8) << 5
|
||||
}
|
||||
}
|
||||
|
||||
@iter
|
||||
|
||||
is_ascii,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue