mapleFU commented on code in PR #2811:
URL: https://github.com/apache/kvrocks/pull/2811#discussion_r1982834298
##########
src/commands/cmd_tdigest.cc:
##########
@@ -168,7 +170,52 @@ class CommandTDigestAdd : public Commander {
std::vector<double> values_;
};
+enum MinMax { MAX, MIN };
+
+template <MinMax T>
Review Comment:
We can make this simplier and just using argument? This is not a cpu-bounded
class, and I guess the performance here is not matter
The compute function uses template because that's cpu bound and branching
matters, here we can just take it easy
--
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]