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:
parent
7d805e67f3
commit
a47f598d77
5 changed files with 20 additions and 1 deletions
1
benchmark/match_gt4.rb
Normal file
1
benchmark/match_gt4.rb
Normal file
|
|
@ -0,0 +1 @@
|
|||
1000000.times { /(.)(.)(\d+)(\d)/.match("THX1138.") }
|
||||
Loading…
Add table
Add a link
Reference in a new issue