about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-09 07:13:46 +0000
committerbors <bors@rust-lang.org>2022-06-09 07:13:46 +0000
commit6dc598a01b8f7619826b7152be5162e6d37a1754 (patch)
tree97f84ee4801fd41602accd3360a892ef07560160 /compiler/rustc_errors/src
parent14947924dfc5f317b564c771f7b98e73d05565e1 (diff)
parent726b35bd701457bc632ca1c5cdb5070a71d6de03 (diff)
downloadrust-6dc598a01b8f7619826b7152be5162e6d37a1754.tar.gz
rust-6dc598a01b8f7619826b7152be5162e6d37a1754.zip
Auto merge of #97862 - SparrowLii:superset, r=lcnr
optimize `superset` method of `IntervalSet`

Given that intervals in the `IntervalSet` are sorted and strictly separated( it means the `end` of the previous interval will not be equal to the `start` of the next interval), we can reduce the complexity of the `superset` method from O(NMlogN) to O(2N) (N is the number of intervals and M is the length of each interval)
Diffstat (limited to 'compiler/rustc_errors/src')
0 files changed, 0 insertions, 0 deletions