diff --git a/core/translate/collate.rs b/core/translate/collate.rs index 721d82944..89804c470 100644 --- a/core/translate/collate.rs +++ b/core/translate/collate.rs @@ -1,6 +1,5 @@ use std::{cmp::Ordering, str::FromStr as _}; -use tracing::Level; use turso_parser::ast::Expr; use crate::{ @@ -37,8 +36,8 @@ impl CollationSeq { }) } + #[inline(always)] pub fn compare_strings(&self, lhs: &str, rhs: &str) -> Ordering { - tracing::event!(Level::DEBUG, collate = %self, lhs, rhs); match self { CollationSeq::Binary => Self::binary_cmp(lhs, rhs), CollationSeq::NoCase => Self::nocase_cmp(lhs, rhs), @@ -46,16 +45,19 @@ impl CollationSeq { } } + #[inline(always)] fn binary_cmp(lhs: &str, rhs: &str) -> Ordering { lhs.cmp(rhs) } + #[inline(always)] fn nocase_cmp(lhs: &str, rhs: &str) -> Ordering { let nocase_lhs = uncased::UncasedStr::new(lhs); let nocase_rhs = uncased::UncasedStr::new(rhs); nocase_lhs.cmp(nocase_rhs) } + #[inline(always)] fn rtrim_cmp(lhs: &str, rhs: &str) -> Ordering { lhs.trim_end().cmp(rhs.trim_end()) }