pitrou commented on code in PR #36067:
URL: https://github.com/apache/arrow/pull/36067#discussion_r1238355926
##########
cpp/src/arrow/compute/kernels/scalar_set_lookup_benchmark.cc:
##########
@@ -91,35 +91,51 @@ static void IsInStringLargeSet(benchmark::State& state) {
}
static void IndexInInt8SmallSet(benchmark::State& state) {
- SetLookupBenchmarkNumeric<Int8Type>(state, "index_in_meta_binary",
state.range(0));
+ SetLookupBenchmarkNumeric<Int8Type>(state, "index_in_meta_binary",
state.range(0),
+ 1 << 18);
}
static void IndexInInt16SmallSet(benchmark::State& state) {
- SetLookupBenchmarkNumeric<Int16Type>(state, "index_in_meta_binary",
state.range(0));
+ SetLookupBenchmarkNumeric<Int16Type>(state, "index_in_meta_binary",
state.range(0),
+ 1 << 18);
}
static void IndexInInt32SmallSet(benchmark::State& state) {
- SetLookupBenchmarkNumeric<Int32Type>(state, "index_in_meta_binary",
state.range(0));
+ SetLookupBenchmarkNumeric<Int32Type>(state, "index_in_meta_binary",
state.range(0),
+ 1 << 18);
}
static void IndexInInt64SmallSet(benchmark::State& state) {
- SetLookupBenchmarkNumeric<Int64Type>(state, "index_in_meta_binary",
state.range(0));
+ SetLookupBenchmarkNumeric<Int64Type>(state, "index_in_meta_binary",
state.range(0),
+ 1 << 18);
+}
+
+static void IndexInInt32LargeSet(benchmark::State& state) {
+ SetLookupBenchmarkNumeric<Int32Type>(state, "index_in_meta_binary",
state.range(0), 10);
}
static void IsInInt8SmallSet(benchmark::State& state) {
- SetLookupBenchmarkNumeric<Int8Type>(state, "is_in_meta_binary",
state.range(0));
+ SetLookupBenchmarkNumeric<Int8Type>(state, "is_in_meta_binary",
state.range(0),
+ 1 << 18);
}
static void IsInInt16SmallSet(benchmark::State& state) {
- SetLookupBenchmarkNumeric<Int16Type>(state, "is_in_meta_binary",
state.range(0));
+ SetLookupBenchmarkNumeric<Int16Type>(state, "is_in_meta_binary",
state.range(0),
+ 1 << 18);
}
static void IsInInt32SmallSet(benchmark::State& state) {
- SetLookupBenchmarkNumeric<Int32Type>(state, "is_in_meta_binary",
state.range(0));
+ SetLookupBenchmarkNumeric<Int32Type>(state, "is_in_meta_binary",
state.range(0),
+ 1 << 18);
}
static void IsInInt64SmallSet(benchmark::State& state) {
- SetLookupBenchmarkNumeric<Int64Type>(state, "is_in_meta_binary",
state.range(0));
+ SetLookupBenchmarkNumeric<Int64Type>(state, "is_in_meta_binary",
state.range(0),
+ 1 << 18);
+}
+
+static void IsInInt32LargeSet(benchmark::State& state) {
+ SetLookupBenchmarkNumeric<Int32Type>(state, "is_in_meta_binary",
state.range(0), 10);
Review Comment:
Well, we should keep the benchmarks meaningful and relevant. A 10-length
input array does not really represent real-world use cases.
We can also add this optimization without adding micro-benchmarks for it.
--
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]