Issue #6173 has been updated by ko1 (Koichi Sasada).


????????????ゆ??筝??違?????鐚????蕁??????堺?ャ?障?????鐚???潟????????????????障????????鐚?
??潟???????炊┤???ゆ??????障?ゃ???????????с?????????????с?????鐚?紊???????絲障??<??????????с?????鐚?

----------------------------------------
Feature #6173: re.c???rb_memsearch()??????????memchr()?????
https://bugs.ruby-lang.org/issues/6173#change-31681

Author: Glass_saga (Masaki Matsushita)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
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/