From c316b824875fdd5ce52338f301fb0255d843dfec Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 6 Dec 2018 17:18:25 -0700 Subject: Add new regnode: ANYOFH, without a bitmap This commit adds a regnode for the case where nothing in the bit map has matches. This allows the bitmap to be omitted, saving 32 bytes of otherwise wasted space per node. Many non-Latin Unicode properties have this characteristic. Further, since this node applies only to code points above 255, which are representable only in UTF-8, we can trivially fail a match where the target string isn't in UTF-8. Time savings also accrue from skipping the bitmap look-up. When swashes are removed, even more time will be saved. --- regcomp.sym | 1 + 1 file changed, 1 insertion(+) (limited to 'regcomp.sym') diff --git a/regcomp.sym b/regcomp.sym index 25008905a8..d48d57e286 100644 --- a/regcomp.sym +++ b/regcomp.sym @@ -62,6 +62,7 @@ ANYOF ANYOF, sv charclass S ; Match character in (or not in) this ANYOFD ANYOF, sv charclass S ; Like ANYOF, but /d is in effect ANYOFL ANYOF, sv charclass S ; Like ANYOF, but /l is in effect ANYOFPOSIXL ANYOF, sv charclass_posixl S ; Like ANYOFL, but matches [[:posix:]] classes +ANYOFH ANYOF, sv 1 S ; Like ANYOF, but only has "High" matches, none in the bitmap ANYOFM ANYOFM byte 1 S ; Like ANYOF, but matches an invariant byte as determined by the mask and arg NANYOFM ANYOFM byte 1 S ; complement of ANYOFM -- cgit v1.2.1