This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add new regnode: ANYOFH, without a bitmap
authorKarl Williamson <khw@cpan.org>
Fri, 7 Dec 2018 00:18:25 +0000 (17:18 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 26 Dec 2018 19:50:38 +0000 (12:50 -0700)
commitc316b824875fdd5ce52338f301fb0255d843dfec
treec713f631b889cca26e22cadb97523733b14b7c8b
parentb2296192536090829ba6d2cb367456f4e346dcc6
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.
pod/perldebguts.pod
regcomp.c
regcomp.sym
regexec.c
regnodes.h
t/re/anyof.t