[Bug libstdc++/83938] Speed up inplace_merge() algorithm & fix inefficient logic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83938 François Dumont changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #8 from François Dumont --- Git commit for this PR hasn't been detected so here it is: commit ba23e045fcb820e8d32dee361c4d048604d8d599 Author: François Dumont Date: Wed Jan 22 17:55:54 2020 +0100 libstdc++: Limit memory allocation in stable_sort/inplace_merge (PR 83938) Reduce memory allocation in stable_sort/inplace_merge algorithms to what is needed by the implementation. Co-authored-by: John Chang libstdc++-v3/ChangeLog: PR libstdc++/83938 * include/bits/stl_tempbuf.h (get_temporary_buffer): Change __len computation in the loop to avoid truncation. * include/bits/stl_algo.h: (__inplace_merge): Take temporary buffer length from smallest range. (__stable_sort): Limit temporary buffer length. * testsuite/25_algorithms/inplace_merge/1.cc (test4): New. * testsuite/performance/25_algorithms/stable_sort.cc: Test stable_sort under different heap memory conditions. * testsuite/performance/25_algorithms/inplace_merge.cc: New test. The added performance test didn't show any enhancement for the algo change so only the innefficiency has been fixed.
[Bug libstdc++/83938] Speed up inplace_merge() algorithm & fix inefficient logic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83938 Jonathan Wakely changed: What|Removed |Added Target Milestone|9.4 |11.0
[Bug libstdc++/83938] Speed up inplace_merge() algorithm & fix inefficient logic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83938 Jakub Jelinek changed: What|Removed |Added Target Milestone|9.3 |9.4 --- Comment #7 from Jakub Jelinek --- GCC 9.3.0 has been released, adjusting target milestone.
[Bug libstdc++/83938] Speed up inplace_merge() algorithm & fix inefficient logic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83938 Jakub Jelinek changed: What|Removed |Added Target Milestone|9.2 |9.3 --- Comment #6 from Jakub Jelinek --- GCC 9.2 has been released.
[Bug libstdc++/83938] Speed up inplace_merge() algorithm & fix inefficient logic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83938 Jakub Jelinek changed: What|Removed |Added Target Milestone|9.0 |9.2 --- Comment #5 from Jakub Jelinek --- GCC 9.1 has been released.
[Bug libstdc++/83938] Speed up inplace_merge() algorithm & fix inefficient logic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83938 François Dumont changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2018-07-24 CC||fdumont at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |fdumont at gcc dot gnu.org Target Milestone|--- |9.0 Ever confirmed|0 |1
[Bug libstdc++/83938] Speed up inplace_merge() algorithm & fix inefficient logic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83938 --- Comment #4 from Paolo Carlini --- Library patches should also go to libstd...@gcc.gnu.org
[Bug libstdc++/83938] Speed up inplace_merge() algorithm & fix inefficient logic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83938 --- Comment #3 from WeiChungChang --- Created attachment 43183 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43183&action=edit proposed solution Proposed solution
[Bug libstdc++/83938] Speed up inplace_merge() algorithm & fix inefficient logic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83938 WeiChungChang changed: What|Removed |Added URL||https://drive.google.com/op ||en?id=1MTigPFnqy7tscE-eCPiw ||9Y8_1blDTL6O --- Comment #2 from WeiChungChang --- Or access the report via this link https://drive.google.com/open?id=1MTigPFnqy7tscE-eCPiw9Y8_1blDTL6O
[Bug libstdc++/83938] Speed up inplace_merge() algorithm & fix inefficient logic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83938 --- Comment #1 from WeiChungChang --- Created attachment 43182 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43182&action=edit report report in detail