Skip to content
Snippets Groups Projects
Commit 6d3eda83f237 authored by ijl's avatar ijl
Browse files

Autovectorize is_four_byte()

parent 0ad6ce3d9dfc
No related branches found
No related tags found
No related merge requests found
......@@ -34,4 +34,5 @@
const STATE_COMPACT: u32 = 0b00000000000000000000000000100000;
fn is_four_byte(buf: &str) -> bool {
let mut ret = false;
for &each in buf.as_bytes() {
......@@ -37,4 +38,3 @@
for &each in buf.as_bytes() {
if unlikely!(each >= 240) {
return true;
ret |= each >= 240;
}
......@@ -40,6 +40,5 @@
}
}
false
ret
}
enum PyUnicodeKind {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment