[libcxx-commits] [libcxx] optimize minmax_element (PR #135495)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 27 07:02:58 PDT 2025
wsehjk wrote:
> I think the main problem is that you're currently reducing in every single iteration. If we search for the minimum and maximum element by line instead, I think the performance would be significantly better, since we'd be able to reduce only once in the end instead.
Hi, I don't quite get it. I'm reducing in every block to get the `block_min_element` and its block position, but how could you search the minimum by line and reduce only once? Can you elaborate a little bit?
https://github.com/llvm/llvm-project/pull/135495
More information about the libcxx-commits
mailing list