You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/09/01 16:25:20 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #8091: ARROW-9873: [C++][Compute] Optimize mode kernel for integers in small value range

pitrou commented on a change in pull request #8091:
URL: https://github.com/apache/arrow/pull/8091#discussion_r481275863



##########
File path: cpp/src/arrow/compute/kernels/aggregate_mode.cc
##########
@@ -26,95 +26,187 @@ namespace aggregate {
 
 namespace {
 
+// Count values and return value:count map
+template <typename T>
+struct ValueCounter {
+  virtual void CountOne(T value) = 0;

Review comment:
       I don't think polymorphism is a good idea for performance. Instead, you should probably use templated code.
   Also, when `null_count == length`, the implementation can be trivial.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org