summaryrefslogtreecommitdiff
path: root/regcomp.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-11-07 15:51:13 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-07 15:51:13 +0000
commit023851150e19d9fc4a9b3320c50e7fc5ccec014f (patch)
treea0dd9f992197de52ae7cb91286a34784072603f1 /regcomp.h
parentc44c482642024dcc060fbe4eb4461ec18af07e2d (diff)
downloadperl-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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/regcomp.h b/regcomp.h
index 225ff74a26..b906b52baf 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -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])