Description
What would you like to be added?
Perhaps it was intentional in the current interval tree implementation, but the currentIntervalTree.Find
operation for exact interval matching appears to rely on a visitor function that visits all overlapping intervals.
It's instead possible and I think a standard approach for exact interval matching to, if left endpoints match, split on right endpoints. This additional ordering structure is added to the insert and find operations. In particular, the additional ordering structure should speed up the IntervalTree.find()
operation, which is used by IntervalTree.Find()
and IntervalTree.Delete()
.
I've attached an MR with the code changes to support this updated interval tree structure: #19768
Update: moved benchmark results using benchstat to the PR.
Why is this needed?
Improve exact interval matching performance of the interval tree.