tustvold commented on a change in pull request #1248:
URL: https://github.com/apache/arrow-rs/pull/1248#discussion_r799317629
##########
File path: arrow/benches/filter_kernels.rs
##########
@@ -42,68 +42,140 @@ fn add_benchmark(c: &mut Criterion) {
let dense_filter_array = create_boolean_array(size, 0.0, 1.0 - 1.0 /
1024.0);
let sparse_filter_array = create_boolean_array(size, 0.0, 1.0 / 1024.0);
- let filter = build_filter(&filter_array).unwrap();
- let dense_filter = build_filter(&dense_filter_array).unwrap();
- let sparse_filter = build_filter(&sparse_filter_array).unwrap();
+ let filter = FilterBuilder::new(&filter_array).optimize().build();
+ let dense_filter =
FilterBuilder::new(&dense_filter_array).optimize().build();
+ let sparse_filter =
FilterBuilder::new(&sparse_filter_array).optimize().build();
let data_array = create_primitive_array::<UInt8Type>(size, 0.0);
- c.bench_function("filter u8", |b| {
+ c.bench_function("filter optimize (1/2)", |b| {
+ b.iter(|| FilterBuilder::new(&filter_array).optimize().build())
+ });
+
+ c.bench_function("filter optimize high selectivity (1023/1024)", |b| {
+ b.iter(|| FilterBuilder::new(&dense_filter_array).optimize().build())
+ });
+
+ c.bench_function("filter optimize low selectivity (1/1024)", |b| {
+ b.iter(|| FilterBuilder::new(&sparse_filter_array).optimize().build())
+ });
+
+ c.bench_function("filter u8 (1/2)", |b| {
b.iter(|| bench_filter(&data_array, &filter_array))
});
- c.bench_function("filter u8 high selectivity", |b| {
+ c.bench_function("filter u8 high selectivity (1023/1024)", |b| {
Review comment:
Updated this to read (kept 1023/1024)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]