[run_set] use lower_bound to skip preceeding entries more quickly.
This commit is contained in:
parent
f2fe3ba2b3
commit
fa657beff6
@ -28,10 +28,11 @@ namespace base {
|
||||
run<T> r(r_);
|
||||
|
||||
if (runs_.size()) {
|
||||
// Correct but slow
|
||||
const_iterator it = runs_.cbegin();
|
||||
|
||||
// Skip all blocks that end before r
|
||||
const_iterator it = runs_.lower_bound(r);
|
||||
if (it != runs_.begin())
|
||||
--it;
|
||||
|
||||
while (it != runs_.end() && it->end_ < r.begin_)
|
||||
++it;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user