Hacker News new | ask | show | jobs
by amccollum 5680 days ago
Actually, Python does use a Boyer-Moore-Horspool variant internally for substring matching (I'm not sure about Ruby, though). See:

http://effbot.org/zone/stringlib.htm

Here's a link to the file in the Python SVN repo:

http://svn.python.org/view/python/trunk/Objects/stringlib/fa...

1 comments

Ruby 1.8.7 does too. Not sure about Oniguruma in 1.9

https://github.com/ruby/ruby/blob/ruby_1_8_7/regex.c#L2751-2...

EDIT: Looks like 1.9 does too:

https://github.com/ruby/ruby/blob/ruby_1_9_2/regint.h#L281