diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-07 15:51:13 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-07 15:51:13 +0000 |
commit | 023851150e19d9fc4a9b3320c50e7fc5ccec014f (patch) | |
tree | a0dd9f992197de52ae7cb91286a34784072603f1 /regcomp.h | |
parent | c44c482642024dcc060fbe4eb4461ec18af07e2d (diff) | |
download | perl-023851150e19d9fc4a9b3320c50e7fc5ccec014f.tar.gz |
Shave off about 5% (Digital UNIX, -g, pixie) of the op/regexp
execution time in regcomp.c S_cl_any() and S_cl_is_anything()
by using memset() and testing bytewise (as opposed to bitwise).
p4raw-id: //depot/perl@7590
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -249,6 +249,7 @@ struct regnode_charclass_class { #define ANYOF_CLASS_ZERO(ret) Zero(((struct regnode_charclass_class*)(ret))->classflags, ANYOF_CLASSBITMAP_SIZE, char) #define ANYOF_BITMAP_ZERO(ret) Zero(((struct regnode_charclass*)(ret))->bitmap, ANYOF_BITMAP_SIZE, char) +#define ANYOF_BITMAP_SETALL(p) (memset(ANYOF_BITMAP(p), 0xff, ANYOF_BITMAP_SIZE)) #define ANYOF_BITMAP(p) (((struct regnode_charclass*)(p))->bitmap) #define ANYOF_BITMAP_BYTE(p, c) (ANYOF_BITMAP(p)[((c) >> 3) & 31]) |