This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 9b554be698 [improvement]Division of integer is too slow (#10769) 9b554be698 is described below commit 9b554be69830c0b91a6e5ce50a10527e158009cd Author: Jerry Hu <mrh...@gmail.com> AuthorDate: Mon Jul 11 19:36:12 2022 +0800 [improvement]Division of integer is too slow (#10769) --- be/src/vec/functions/int_div.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/be/src/vec/functions/int_div.h b/be/src/vec/functions/int_div.h index 2357eb5af1..4bfd0f661b 100644 --- a/be/src/vec/functions/int_div.h +++ b/be/src/vec/functions/int_div.h @@ -48,8 +48,9 @@ struct DivideIntegralImpl { if (!is_null) { if constexpr (!std::is_floating_point_v<A> && !std::is_same_v<A, Int128> && !std::is_same_v<A, Int8> && !std::is_same_v<A, UInt8>) { + const auto divider = libdivide::divider<A>(b); for (size_t i = 0; i < size; i++) { - c[i] = a[i] / libdivide::divider<A>(b); + c[i] = a[i] / divider; } } else { for (size_t i = 0; i < size; i++) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org