Skip to content

Commit

Permalink
switch select helper from std::collections::HashSet to faster ahash::…
Browse files Browse the repository at this point in the history
…AHashSet
  • Loading branch information
jqnatividad committed Oct 27, 2023
1 parent a16a1ca commit 8093f52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/select.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 8093f52

Please sign in to comment.