public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/100223] New: Missing early return in std::partial_sort
@ 2021-04-23  3:16 hewillk at gmail dot com
  2021-04-23  8:23 ` [Bug libstdc++/100223] " redi at gcc dot gnu.org
  2021-04-23  8:46 ` hewillk at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: hewillk at gmail dot com @ 2021-04-23  3:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100223

            Bug ID: 100223
           Summary: Missing early return in std::partial_sort
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

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, and
make the result more consistent with ranges::partial_sort?

https://godbolt.org/z/Kb5x8zfeh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-23  8:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23  3:16 [Bug libstdc++/100223] New: Missing early return in std::partial_sort hewillk at gmail dot com
2021-04-23  8:23 ` [Bug libstdc++/100223] " redi at gcc dot gnu.org
2021-04-23  8:46 ` hewillk at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).