Hi,

In message "[ruby-talk:20606] Re: String.subst[!] RCR"
    on 01/08/31, "Aristarkh A Zagorodnikov" <xm / w3d.ru> writes:

|> Regular expression search is pretty fast for most of the cases
|> (especially for fixed patterns).  It uses BM search inside.
|> As a result, str.sub(/foo/, 'bar') is often faster than your
|> str.subst('foo','bar').
|
|I'm sure it _is_ faster ... but I believe that's it because of subst is
|written in ruby, while sub is in C.

I meant RE substitute can be as fast as C implemeted subst.

							matz.