mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Implement cache optimization for regexp matching
This commit is contained in:
parent
230267d1a8
commit
881bf9a0b8
2 changed files with 476 additions and 1 deletions
8
regint.h
8
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue