]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Enhance branching in std::inplace_merge and std::stable_sort
authorFrançois Dumont <fdumont@gcc.gnu.org>
Thu, 21 Jan 2021 18:30:47 +0000 (19:30 +0100)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Mon, 18 Jul 2022 20:40:10 +0000 (22:40 +0200)
commit63d182fb86e47323ac50d9368845d712e1f7da89
tree4e72314fe5acae3bb8e356d16d7629c32a87ecb3
parent5e47c9333df6df1aa9da861f07e68f985d7d28fb
libstdc++: Enhance branching in std::inplace_merge and std::stable_sort

When we manage to allocate a buffer of the expected size we can simplify the code to
perform the expected algorithm.

libstdc++-v3/ChangeLog:

* include/bits/stl_algo.h
(__merge_adaptive): Adapt to merge only when buffer is large enough..
(__merge_adaptive_resize): New, adapt merge when buffer is too small.
(__inplace_merge): Adapt, use latter.
(__stable_sort_adaptive): Adapt to sort only when buffer is large enough.
(__stable_sort_adaptive_resize): New, adapt sort when buffer is too small.
(__stable_sort): Adapt, use latter.
libstdc++-v3/include/bits/stl_algo.h
This page took 0.06175 seconds and 5 git commands to generate.