Speed up is_ignored_char in the common case

This commit is contained in:
Kovid Goyal
2020-08-06 18:05:33 +05:30
parent 8f9616c230
commit 628b92f20b
2 changed files with 9 additions and 2 deletions

1
kitty/unicode-data.c generated
View File

@@ -602,6 +602,7 @@ is_combining_char(char_type code) {
bool
is_ignored_char(char_type code) {
// Control characters and non-characters (2339 codepoints) {{{
if (LIKELY(0x20 <= code && code <= 0x7e)) return false;
switch(code) {
case 0x0 ... 0x1f:
return true;