From 8093f5212b3032e77071546fdd65605a7ec38b7e Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Fri, 27 Oct 2023 05:35:16 -0400 Subject: [PATCH] switch select helper from std::collections::HashSet to faster ahash::AHashSet --- src/select.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/select.rs b/src/select.rs index 3dde33c19..90af10064 100644 --- a/src/select.rs +++ b/src/select.rs @@ -1,12 +1,12 @@ use std::{ cmp::Ordering, - collections::HashSet, fmt, iter::{self, repeat}, ops, slice, str::FromStr, }; +use ahash::AHashSet; use regex::bytes::Regex; use serde::de::{Deserialize, Deserializer, Error}; @@ -52,7 +52,7 @@ impl SelectColumns { map.extend(idxs?); } if self.invert { - let set: HashSet<_> = map.into_iter().collect(); + let set: AHashSet<_> = map.into_iter().collect(); let mut map = vec![]; for i in 0..first_record.len() { if !set.contains(&i) {