From: FireAphis Date: 2007-10-03T16:15:13+09:00 Subject: Searching through a sorted array Hello, I have a very big array of objects sorted by one of its numeric data members. During the flow of my application I need occasionally to get all the elements in a specific range. I could use find_all partition = my_array.find_all {|x| (x > start) && (x < end)} My problem is that, as far as I know, find_all just iterates through all the elements of the array and that's very inefficient, especially in my case, in which I have a sorted array. Is there any standard way to search efficiently through a sorted array? A binary search for example? Thanks FireAphis