Optimize anchor comparison and take full advantage of fragment IDs

This commit is contained in:
Antonio Scandurra 2021-12-10 09:16:58 +01:00
parent 1ed1ec21dd
commit eeba0993aa
5 changed files with 19 additions and 13 deletions

View file

@ -1,6 +1,12 @@
use lazy_static::lazy_static;
use smallvec::{smallvec, SmallVec};
use std::iter;
lazy_static! {
pub static ref MIN: Locator = Locator::min();
pub static ref MAX: Locator = Locator::max();
}
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Locator(SmallVec<[u64; 4]>);