From b8bdff9853c3bb390732840d3ed9f1c99cca82db Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 27 Nov 2013 12:46:42 -0700 Subject: [PATCH] regcomp.c: Slight optimization A swash is accessed either through its inversion list or its hash (only large swashes actually have hashes; this is usually transparent). At this point in regcomp.c, we only will be looking at the inversion list; by telling swash_init function that via the flag, later accesses automatically have a level of indirection removed. --- regcomp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/regcomp.c b/regcomp.c index ca36cbb..baf7e32 100644 --- a/regcomp.c +++ b/regcomp.c @@ -13019,7 +13019,12 @@ parseit: char *e; /* We will handle any undefined properties ourselves */ - U8 swash_init_flags = _CORE_SWASH_INIT_RETURN_IF_UNDEF; + U8 swash_init_flags = _CORE_SWASH_INIT_RETURN_IF_UNDEF + /* And we actually would prefer to get + * the straight inversion list of the + * swash, since we will be accessing it + * anyway, to save a little time */ + |_CORE_SWASH_INIT_ACCEPT_INVLIST; if (RExC_parse >= RExC_end) vFAIL2("Empty \\%c{}", (U8)value); -- 2.7.4