From 881bf9a0b8b52c05a5917b95d988ae4b9a391a47 Mon Sep 17 00:00:00 2001 From: TSUYUSATO Kitsune Date: Mon, 3 Oct 2022 22:21:56 +0900 Subject: Implement cache optimization for regexp matching --- regint.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'regint.h') diff --git a/regint.h b/regint.h index 00b4b6ed9b..1f0d815db0 100644 --- a/regint.h +++ b/regint.h @@ -41,6 +41,14 @@ /* for byte-code statistical data. */ /* #define ONIG_DEBUG_STATISTICS */ +/* enable matching optimization by using cache. */ +#define USE_CACHE_MATCH_OPT + +#ifdef USE_CACHE_MATCH_OPT +# define NUM_CACHE_OPCODE_FAIL -1 +# define NUM_CACHE_OPCODE_UNINIT -2 +#endif + #if defined(ONIG_DEBUG_PARSE_TREE) || defined(ONIG_DEBUG_MATCH) || \ defined(ONIG_DEBUG_SEARCH) || defined(ONIG_DEBUG_COMPILE) || \ defined(ONIG_DEBUG_STATISTICS) || defined(ONIG_DEBUG_MEMLEAK) -- cgit v1.2.1