Skip to content

Commit e09f68a

Browse files
committed
bitmap_instead_smaller_datatypes
1 parent 3f091d9 commit e09f68a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

datafusion/functions-aggregate/benches/approx_distinct.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ fn approx_distinct_benchmark(c: &mut Criterion) {
123123
for pct in [80, 99] {
124124
let n_distinct = BATCH_SIZE * pct / 100;
125125

126-
// --- Int64 benchmarks ---
126+
// Int64
127127
let values = Arc::new(create_i64_array(n_distinct)) as ArrayRef;
128128
c.bench_function(&format!("approx_distinct i64 {pct}% distinct"), |b| {
129129
b.iter(|| {
@@ -139,7 +139,7 @@ fn approx_distinct_benchmark(c: &mut Criterion) {
139139
{
140140
let string_pool = create_string_pool(n_distinct, str_len);
141141

142-
// --- Utf8 benchmarks ---
142+
// Utf8
143143
let values = Arc::new(create_string_array(&string_pool)) as ArrayRef;
144144
c.bench_function(
145145
&format!("approx_distinct utf8 {label} {pct}% distinct"),
@@ -153,7 +153,7 @@ fn approx_distinct_benchmark(c: &mut Criterion) {
153153
},
154154
);
155155

156-
// --- Utf8View benchmarks ---
156+
// Utf8View
157157
let values = Arc::new(create_string_view_array(&string_pool)) as ArrayRef;
158158
c.bench_function(
159159
&format!("approx_distinct utf8view {label} {pct}% distinct"),
@@ -169,7 +169,7 @@ fn approx_distinct_benchmark(c: &mut Criterion) {
169169
}
170170
}
171171

172-
// --- Bitmap type benchmarks (our optimization) ---
172+
// Small integer types
173173

174174
// UInt8
175175
let values = Arc::new(create_u8_array(200)) as ArrayRef;

datafusion/functions-aggregate/benches/count_distinct.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn count_distinct_benchmark(c: &mut Criterion) {
9191
for pct in [80, 99] {
9292
let n_distinct = BATCH_SIZE * pct / 100;
9393

94-
// --- Int64 benchmarks (HashSet-based) ---
94+
// Int64
9595
let values = Arc::new(create_i64_array(n_distinct)) as ArrayRef;
9696
c.bench_function(&format!("count_distinct i64 {pct}% distinct"), |b| {
9797
b.iter(|| {
@@ -103,9 +103,9 @@ fn count_distinct_benchmark(c: &mut Criterion) {
103103
});
104104
}
105105

106-
// --- Small integer type benchmarks (our optimization) ---
106+
// Small integer types
107107

108-
// UInt8 - bool array based
108+
// UInt8
109109
let values = Arc::new(create_u8_array(200)) as ArrayRef;
110110
c.bench_function("count_distinct u8 bitmap", |b| {
111111
b.iter(|| {
@@ -116,7 +116,7 @@ fn count_distinct_benchmark(c: &mut Criterion) {
116116
})
117117
});
118118

119-
// Int8 - bool array based
119+
// Int8
120120
let values = Arc::new(create_i8_array(200)) as ArrayRef;
121121
c.bench_function("count_distinct i8 bitmap", |b| {
122122
b.iter(|| {
@@ -127,7 +127,7 @@ fn count_distinct_benchmark(c: &mut Criterion) {
127127
})
128128
});
129129

130-
// UInt16 - bitmap based
130+
// UInt16
131131
let values = Arc::new(create_u16_array(50000)) as ArrayRef;
132132
c.bench_function("count_distinct u16 bitmap", |b| {
133133
b.iter(|| {
@@ -138,7 +138,7 @@ fn count_distinct_benchmark(c: &mut Criterion) {
138138
})
139139
});
140140

141-
// Int16 - bitmap based
141+
// Int16
142142
let values = Arc::new(create_i16_array(50000)) as ArrayRef;
143143
c.bench_function("count_distinct i16 bitmap", |b| {
144144
b.iter(|| {

0 commit comments

Comments
 (0)