Benchmark.bm do |x|
x.report do
1000.times { str.index("fugafuga") }
end
end
trunk(r35363):
user system total real
0.070000 0.000000 0.070000 ( 0.072126)
user system total real
0.070000 0.010000 0.080000 ( 0.081420)
user system total real
0.080000 0.000000 0.080000 ( 0.091658)
proposal:
user system total real
0.000000 0.000000 0.000000 ( 0.004237)
user system total real
0.000000 0.000000 0.000000 ( 0.003737)
user system total real
0.010000 0.000000 0.010000 ( 0.004696)
This issue was solved with changeset r37634.
Masaki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
re.c (rb_memsearch_ss): performance improvement by using memmem(3) if
possible. [ruby-dev:45530] [Feature #6311]
configure.in: check existence of memmem(3) and that it is not broken.