iChauster commented on code in PR #13302:
URL: https://github.com/apache/arrow/pull/13302#discussion_r888402428


##########
cpp/src/arrow/compute/kernels/scalar_temporal_benchmark.cc:
##########
@@ -214,5 +240,19 @@ BENCHMARK_TEMPLATE(BenchmarkStrptime, 
non_zoned)->Apply(SetArgs);
 BENCHMARK_TEMPLATE(BenchmarkStrptime, zoned)->Apply(SetArgs);
 BENCHMARK(BenchmarkAssumeTimezone)->Apply(SetArgs);
 
+// binary temporal benchmarks

Review Comment:
   They are binary, but I believe these kernels are already benchmarked in 
`scalar_arithmetic_benchmark.cc`. Does this mean adding support for adding, 
subtracting, (multiplying and dividing!) timestamps, and then benchmarking 
those implementations?



##########
cpp/src/arrow/compute/kernels/scalar_temporal_benchmark.cc:
##########
@@ -172,6 +194,10 @@ auto non_zoned = timestamp(TimeUnit::NANO);
 #define DECLARE_TEMPORAL_BENCHMARKS_ZONED(OP) \
   BENCHMARK_TEMPLATE(BenchmarkTemporal, OP, zoned)->Apply(SetArgs);
 
+#define DECLARE_TEMPORAL_BINARY_BENCHMARKS(OP)                                \
+  BENCHMARK_TEMPLATE(BenchmarkTemporalBinary, OP, non_zoned)->Apply(SetArgs); \
+  BENCHMARK_TEMPLATE(BenchmarkTemporalBinary, OP, zoned)->Apply(SetArgs);

Review Comment:
   Hi @rok, thanks for the timely review! 
   
   I was a bit curious about this, since it seems for `BenchmarkTemporalBinary` 
and `BenchmarkTemporal` (the original unary version), we are picking random 
`int64_t` -- which I assume is `date64`. How do we achieve the other time 
types, and is there some helpful example code I can follow?



-- 
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]

Reply via email to