Skip to content

Commit 1e4c742

Browse files
authored
Optimize Instructions (#14)
* 1/3rd less wasm or x86 instructions than match * simpler * Less is more. This seems just as short.
1 parent 38fb70e commit 1e4c742

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -597,5 +597,7 @@ where
597597
}
598598

599599
fn is_hex_ascii(byte: &u8) -> bool {
600-
matches!(*byte, b'0'..=b'9' | b'A'..=b'F' | b'a'..=b'f')
600+
// Convert to lowercase.
601+
let byte = byte | 0b10_0000;
602+
matches!(byte, b'0'..=b'9' | b'a'..=b'f')
601603
}

0 commit comments

Comments
 (0)