From: "Jesús Gabriel y Galán" Date: 2010-06-25T00:50:35+09:00 Subject: Re: Count substrings in string, scan too slow On Thu, Jun 24, 2010 at 5:45 PM, Danny Challis wrote: > Thanks Jesus, >    This method actually decreased the runtime by quite a bit, so thanks > for the help!  However, I still need something even faster if it exists, > so any other ideas would be appreciated.  I may have to just implement > this part is C or something. I suppose that if you implement a C method that does what I did in Ruby, that would be faster. I mean doing the loop in C and calling String#index from there. Jesus.