A computer-implemented method for hashing an interval, comprising: obtaining, by a computer system comprising a set of processors, a data structure representing a set of intervals to be hashed, wherein a respective interval comprises dense consecutively-ordered elements; dividing (304, 400), by the computer system, the respective interval into a set of sub-intervals based on a locality-preserving hashing that maps nearby elements to nearby hash codes, wherein dividing (304, 400) the respective interval further comprises: obtaining, via the locality-preserving hashing, a low hash code for a lowest-ordered element and a high hash code for a highest-ordered element of the respective interval; forming a set of hash codes including the low hash code, a hash code intermediate to the low and high hash codes, and the high hash code; obtaining a maximal interval associated only with a respective hash code in the set of hash codes, wherein the maximal interval is not subsumed by any larger interval associated only with the respective hash code; and identifying a respective sub-interval associated with the respective hash code based on the obtained maximal interval and the lowest-ordered element and highest-ordered element of the respective interval; obtaining, via the locality-preserving hashing, a hash code associated with the respective sub-interval; inserting the respective sub-interval into an interval hash table at a location corresponding to the obtained hash code; and searching the interval hash table, which comprises: receiving a search query comprising a search interval; dividing the search interval into a set of search sub-intervals based on the locality-preserving hashing; obtaining, via the locality-preserving hashing, a search hash code associated with a respective search sub-interval; and searching the hash table for intervals associated with the hash code that overlap with the respective search sub-interval, based on comparing lowest- and highest-ordered elements of a second interval with lowest- and highest-ordered elements of the respective search sub-interval. obtaining, by a computer system comprising a set of processors, a data structure representing a set of intervals to be hashed, wherein a respective interval comprises dense consecutively-ordered elements; dividing (304, 400), by the computer system, the respective interval into a set of sub-intervals based on a locality-preserving hashing that maps nearby elements to nearby hash codes, wherein dividing (304, 400) the respective interval further comprises: obtaining, via the locality-preserving hashing, a low hash code for a lowest-ordered element and a high hash code for a highest-ordered element of the respective interval; forming a set of hash codes including the low hash code, a hash code intermediate to the low and high hash codes, and the high hash code; obtaining a maximal interval associated only with a respective hash code in the set of hash codes, wherein the maximal interval is not subsumed by any larger interval associated only with the respective hash code; and identifying a respective sub-interval associated with the respective hash code based on the obtained maximal interval and the lowest-ordered element and highest-ordered element of the respective interval; obtaining, via the locality-preserving hashing, a low hash code for a lowest-ordered element and a high hash code for a highest-ordered element of the respective interval; forming a set of hash codes including the low hash code, a hash code intermediate to the low and high hash codes, and the high hash code; obtaining a maximal interval associated only with a respective hash code in the set of hash codes, wherein the maximal interval is not subsumed by any larger interval associated only with the respective hash code; and identifying a respective sub-interval associated with the respective hash code based on the obtained maximal interval and the lowest-ordered element and highest-ordered element of the respective interval; obtaining, via the locality-preserving hashing, a hash code associated with the respective sub-interval; inserting the respective sub-interval into an interval hash table at a location corresponding to the obtained hash code; and searching the interval hash table, which comprises: receiving a search query comprising a search interval; dividing the search interval into a set of search sub-intervals based on the locality-preserving hashing; obtaining, via the locality-preserving hashing, a search hash code associated with a respective search sub-interval; and searching the hash table for intervals associated with the hash code that overlap with the respective search sub-interval, based on comparing lowest- and highest-ordered elements of a second interval with lowest- and highest-ordered elements of the respective search sub-interval. receiving a search query comprising a search interval; dividing the search interval into a set of search sub-intervals based on the locality-preserving hashing; obtaining, via the locality-preserving hashing, a search hash code associated with a respective search sub-interval; and searching the hash table for intervals associated with the hash code that overlap with the respective search sub-interval, based on comparing lowest- and highest-ordered elements of a second interval with lowest- and highest-ordered elements of the respective search sub-interval.