Skip to content

Commit

Permalink
add neon vector classifier bench
Browse files Browse the repository at this point in the history
  • Loading branch information
chengsun committed May 29, 2022
1 parent 51de759 commit e75e8ec
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions benches/benches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,19 @@ fn bench_vector_classifier(c: &mut Criterion) {
}
}

#[cfg(target_arch = "aarch64")]
match vector_classifier::NeonBuilder::new() {
None => (),
Some(neon_builder) => {
let neon_classifier = neon_builder.build(&lookup_tables);
group.bench_function("neon",
|b| b.iter_batched(|| bytes.clone(), |mut bytes| {
neon_classifier.classify(&mut bytes);
black_box(bytes);
}, BatchSize::SmallInput));
}
}

group.finish();
}

Expand Down

0 comments on commit e75e8ec

Please sign in to comment.