js8544 commented on code in PR #36067: URL: https://github.com/apache/arrow/pull/36067#discussion_r1238490730
########## 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: Actually, we do use `IndexIn` in a similar fashion. In our recommender system, we need to find if the candidate items (25~50ish) appear in the user's action history (up to 100000 for really acrive users). However, I can remove this if you have a strong opinion. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org