Inlining on btree commitment map comparators for a 10% win
This commit is contained in:
@@ -391,17 +391,20 @@ impl LiveRangeKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl std::cmp::PartialEq for LiveRangeKey {
|
impl std::cmp::PartialEq for LiveRangeKey {
|
||||||
|
#[inline(always)]
|
||||||
fn eq(&self, other: &Self) -> bool {
|
fn eq(&self, other: &Self) -> bool {
|
||||||
self.to > other.from && self.from < other.to
|
self.to > other.from && self.from < other.to
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl std::cmp::Eq for LiveRangeKey {}
|
impl std::cmp::Eq for LiveRangeKey {}
|
||||||
impl std::cmp::PartialOrd for LiveRangeKey {
|
impl std::cmp::PartialOrd for LiveRangeKey {
|
||||||
|
#[inline(always)]
|
||||||
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
||||||
Some(self.cmp(other))
|
Some(self.cmp(other))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl std::cmp::Ord for LiveRangeKey {
|
impl std::cmp::Ord for LiveRangeKey {
|
||||||
|
#[inline(always)]
|
||||||
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
|
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
|
||||||
if self.to <= other.from {
|
if self.to <= other.from {
|
||||||
std::cmp::Ordering::Less
|
std::cmp::Ordering::Less
|
||||||
|
|||||||
Reference in New Issue
Block a user