diff options
author | Flaviu Tamas <tamasflaviu@gmail.com> | 2015-04-12 10:33:21 -0400 |
---|---|---|
committer | Flaviu Tamas <tamasflaviu@gmail.com> | 2015-04-12 10:33:21 -0400 |
commit | 90d17c4e03fe0a7ad1567bf9755d8ba836220cd7 (patch) | |
tree | ddd794f0421b0a877868303ef1229fa1e384656d /web/snippets | |
parent | 8b8224ecaf7ed8cfbe1a205b43c3402aabc1653f (diff) | |
download | Nim-90d17c4e03fe0a7ad1567bf9755d8ba836220cd7.tar.gz |
Improve performance
Removing ANCHORED means that after findIter is unable to find any more matches, it doesn't bother searching unless there are some promising 0-len matches. This significantly improves performance on problems like `"abccccccccccccc".find(re"a")`. Previously, each "c" would require a call to pcre_exec, which would iterate over [index_of_c..string.len], a O(n^2) process!
Diffstat (limited to 'web/snippets')
0 files changed, 0 insertions, 0 deletions