ruby/benchmark/regexp_dup.yml
Nobuyoshi Nakada ab6eb3786c
Optimize Regexp#dup and Regexp.new(/RE/)
When copying from another regexp, copy already built `regex_t` instead
of re-compiling its source.
2023-06-09 20:22:30 +09:00

6 lines
79 B
YAML

prelude: |
str = "a" * 1000
re = Regexp.new(str)
benchmark:
dup: re.dup