Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up MVM_string_find_cclass and cclass
Speeds up .words in rakudo a fair amount by speeding up WhiteSpace search. Also convert code that checked for multiple General Categories so that it checks for only one. Add code to ucd2c.pl which allows us to check for WhiteSpace and Zl, Zp codepoints without having to query the Unicode database to improve performance. This creates macros which we can use in conditionals.
- Loading branch information
Showing
3 changed files
with
81 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#define MVM_CP_is_White_Space(cp) (((cp) == 9) || ((cp) == 10) || ((cp) == 11) || ((cp) == 12) || ((cp) == 13) || ((cp) == 32) || ((cp) == 133) || ((cp) == 160) || ((cp) == 5760) || ((cp) == 8192) || ((cp) == 8193) || ((cp) == 8194) || ((cp) == 8195) || ((cp) == 8196) || ((cp) == 8197) || ((cp) == 8198) || ((cp) == 8199) || ((cp) == 8200) || ((cp) == 8201) || ((cp) == 8202) || ((cp) == 8232) || ((cp) == 8233) || ((cp) == 8239) || ((cp) == 8287) || ((cp) == 12288)) | ||
#define MVM_CP_is_gencat_name_Zl(cp) (((cp) == 8232)) | ||
#define MVM_CP_is_gencat_name_Zp(cp) (((cp) == 8233)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters