Commit 12ac0c9
perf: pre-compile regex in RegexMatch using cached compilation (#1721)
RegexMatch() called regexp.MatchString() which recompiles the pattern on
every invocation. Use the existing mustCompileOrGet() cache instead.
Ref #1690
Co-authored-by: tengtian <tengtianmoemoe@gamil,com>1 parent 16b0c89 commit 12ac0c9
1 file changed
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
| 335 | + | |
340 | 336 | | |
341 | 337 | | |
342 | 338 | | |
| |||
0 commit comments