Skip to content

Commit

Permalink
perf: slightly faster float equality (#11652)
Browse files Browse the repository at this point in the history
  • Loading branch information
orlp authored Oct 11, 2023
1 parent 9524b29 commit 32e3652
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/nano-arrow/src/util/total_ord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ macro_rules! impl_eq_ord_float {
impl TotalEq for $f {
#[inline(always)]
fn tot_eq(&self, other: &Self) -> bool {
if self.is_nan() && other.is_nan() {
true
if self.is_nan() {
other.is_nan()
} else {
self == other
}
Expand Down

0 comments on commit 32e3652

Please sign in to comment.