in reply to Range overlap (with a lot of ranges)
Are, as implied, your predefined ranges integer bounded and non-overlapping? What is the overall range 0 .. max?