Skip to content

Commit 7b29b70

Browse files
Add a right shift mapping
This saves less bytes - by far - and is likely not the best operator to choose. But for now, it works -- a better choice may arise later. Alphabetic : 2538 bytes (- 84 bytes) Case_Ignorable : 1773 bytes (- 30 bytes) Cased : 790 bytes (- 18 bytes) Cc : 26 bytes (- 6 bytes) Grapheme_Extend: 1490 bytes (- 18 bytes) Lowercase : 865 bytes (- 36 bytes) N : 1040 bytes (- 24 bytes) Uppercase : 778 bytes (- 60 bytes) White_Space : 85 bytes (- 6 bytes) Total table sizes: 9385 bytes (-282 bytes)
1 parent b0e121d commit 7b29b70

File tree

4 files changed

+814
-833
lines changed

4 files changed

+814
-833
lines changed

src/libcore/unicode/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ fn range_search<
6666
} else {
6767
let (real_idx, mapping) = bitset_canonicalized[idx - CANONICAL];
6868
let mut word = bitset_canonical[real_idx as usize];
69-
let should_invert = mapping & (1 << 7) != 0;
69+
let should_invert = mapping & (1 << 6) != 0;
7070
if should_invert {
7171
word = !word;
7272
}
7373
// Unset the inversion bit
74-
let rotate_by = mapping & !(1 << 7);
74+
let rotate_by = mapping & !(1 << 6);
7575
word = word.rotate_left(rotate_by as u32);
7676
word
7777
};

0 commit comments

Comments
 (0)