aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/match_small.rb
diff options
context:
space:
mode:
authorLourens Naudé <lourens@bearmetal.eu>2019-04-20 00:44:51 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-07 21:58:55 +0900
commita47f598d77ac97f9fe89fe16aa8bcab4fd262c16 (patch)
tree069ca07cf1e65cc9d253dab5101d23bed933c21a /benchmark/match_small.rb
parent7d805e67f3275aef066d77aa9c32bef715c362ed (diff)
downloadruby-a47f598d77ac97f9fe89fe16aa8bcab4fd262c16.tar.gz
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
Diffstat (limited to 'benchmark/match_small.rb')
-rw-r--r--benchmark/match_small.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/benchmark/match_small.rb b/benchmark/match_small.rb
new file mode 100644
index 0000000000..3b743d484a
--- /dev/null
+++ b/benchmark/match_small.rb
@@ -0,0 +1 @@
+1000000.times { 'haystack'.match(/hay/) }