Issue #6173 has been updated by Glass_saga (Masaki Matsushita).

File patch2.diff added

??鴻?羞糸????篏帥??????潟????????c??????patch???篆罩?????障????????
----------------------------------------
Feature #6173: re.c???rb_memsearch()??????????memchr()?????
https://bugs.ruby-lang.org/issues/6173#change-24921

Author: Glass_saga (Masaki Matsushita)
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: 2.0.0


re.c???rb_memsearch()??с???m == 1???翫??????for?????у???????ゃ??????莠??????????障????????memchr()?????????????ц?純??劫???????帥???????障?????
罨<????????????潟???????若???絎?茵?????????????????篁ヤ???????????????????????障????????

require 'benchmark'

str = "hoge" * 10000 + "\n"

Benchmark.bm do |x|
  x.report do
    str.index("\n")
  end
end

trunk(r35083):
       user     system      total        real 
   0.000000   0.000000   0.000000 (  0.000185)

proposal:
       user     system      total        real 
   0.000000   0.000000   0.000000 (  0.000018)

patch???羞私???????障?????


-- 
http://bugs.ruby-lang.org/