4 ms·
Maybe because some friendly contributor such as yourself hadn't added it yet! I have no idea, really, but apparently the Ruby index method drops down to C so i
by stephenhuey 14y ago
Maybe because some friendly contributor such as yourself hadn't added it yet! I have no idea, really, but apparently the Ruby index method drops down to C so it's fairly fast:
http://stackoverflow.com/questions/7436155/rubyindex-method-vs-binary-search http://stackoverflow.com/questions/7436155/rubyindex-method-...
That being said, binary search is a welcome addition.