title: anything faster than .include?
body: <p>I'm currently working with arrays and i decided to try and speed up one of my functions with replacing and iterative search of a sorted array with .include? much to my surprise the total run time of the program went from 2:12 to 9:53. confused by this i went to look at the source code for .include? and it turns out it's just an iterative check written in C</p>
  
  <pre><code>rb_ary_includes(VALUE ary, VALUE item)
  {
          long i;
  
          for (i=0; i&lt;RARRAY_LEN(ary); i++) {
                  if (rb_equal(RARRAY_AREF(ary, i), item)) {
                          return Qtrue;
                  }
          }
          return Qfalse;
  }
  </code></pre>
  
  <p>is there a faster way to determine whether a certain item is in a sorted array, maybe a gem? or do things need to be done the hard way with writing in your own binary search method?                   </p>