1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Reduce ONIG_NREGION from 10 to 4: power of 2 and testing revealed most pattern matches are less than or equal to 4 results

Closes: https://github.com/ruby/ruby/pull/2135
This commit is contained in:
Lourens Naudé 2019-04-20 00:44:51 +01:00 committed by Nobuyoshi Nakada
parent 7d805e67f3
commit a47f598d77
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
5 changed files with 20 additions and 1 deletions

1
benchmark/match_small.rb Normal file
View file

@ -0,0 +1 @@
1000000.times { 'haystack'.match(/hay/) }