John Joyce
7/23/2007 3:03:00 AM
On Jul 22, 2007, at 1:04 PM, Peter Seebach wrote:
> In message
> <cebd6fd10707220221g67c7c969hd7c022fa08cd091e@mail.gmail.com>,
> "Nobuyoshi Nakada" wr
> ites:
>> At Sun, 22 Jul 2007 12:25:01 +0900,
>> bcparanj@gmail.com wrote in [ruby-talk:261195]:
>>> Does anyone know if this is already part of Ruby open source
>>> library?
>>> I did not find anything on Google. TIA.
>
>> String#index uses Karp-Rabin algorithm, not Boyer-Moore.
>
> That strikes me as secondary; presumably, the goal is to implement
> it in Ruby
> code, not to determine what algorithm the language internals use, no?
>
> -s
>
Perhaps if you look into the code for one of those functions, you
might find that it is done in Ruby, you might not.