Alternative to Array#index?


#1

is there an alternative to Array#index? Faster version maybe?


#2

Aaron S. wrote:

is there an alternative to Array#index? Faster version maybe?

Change the problem so that you’re reading from a hash? Maintain an
index hash alongside the array? Keep the array sorted somehow? It
depends on the problem you’re trying to solve, really…