[llvm-bugs] [Bug 50087] New: Missing early return in std::partial_sort
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Apr 22 21:33:43 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50087
Bug ID: 50087
Summary: Missing early return in std::partial_sort
Product: libc++
Version: 11.0
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Standards Issues
Assignee: unassignedclangbugs at nondot.org
Reporter: hewillk at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
Hi, can we add an early return to std::partial_sort to avoid unnecessary O(n)
operations when __first is equal to __middle, just like std::rotate does?
https://godbolt.org/z/GfvzeT8Px
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210423/39f1df74/attachment.html>
More information about the llvm-bugs
mailing list