MCPcopy Create free account
hub / github.com/apache/arrow / ArrayRankSetArgs

Function ArrayRankSetArgs

cpp/src/arrow/compute/kernels/vector_sort_benchmark.cc:507–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505//
506
507void ArrayRankSetArgs(benchmark::internal::Benchmark* bench) {
508 // 3 benchmark arguments: size, inverse null proportion, rank tiebreaker
509 bench->Unit(benchmark::kNanosecond);
510 bench->ArgNames({"", "", "tiebreaker"});
511
512 // Use only a subset of kInverseNullProportions as the cartesian product of
513 // arguments is large already.
514 const std::vector<ArgsType> inverse_null_proportions{10, 1, 0};
515 // Don't bother with Max as it should have the same perf as Min
516 const std::vector<RankOptions::Tiebreaker> tie_breakers{
517 RankOptions::Min, RankOptions::First, RankOptions::Dense};
518
519 for (const auto inverse_null_proportion : kInverseNullProportions) {
520 for (const auto tie_breaker : tie_breakers) {
521 bench->Args({static_cast<ArgsType>(kL1Size), inverse_null_proportion,
522 static_cast<ArgsType>(tie_breaker)});
523 }
524 }
525 for (const auto tie_breaker : tie_breakers) {
526 bench->Args({1 << 20, 100, static_cast<ArgsType>(tie_breaker)});
527 }
528 for (const auto tie_breaker : tie_breakers) {
529 bench->Args({1 << 23, 100, static_cast<ArgsType>(tie_breaker)});
530 }
531}
532
533BENCHMARK(ArrayRankInt64Narrow)->Apply(ArrayRankSetArgs);
534BENCHMARK(ArrayRankInt64Wide)->Apply(ArrayRankSetArgs);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected