[PATCH] Simplify branching in algos
François Dumont
frs.dumont@gmail.com
Thu May 27 05:04:25 GMT 2021
Following latest fixes in std::inplace_merge and std::stable_sort you
propose Jonathan to enhance branching in the first.
Here is a proposal based on yours to do so in both algos.
libstdc++: Enhance branching in std::inplace_merge and std::stable_sort
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.
Tested under Linux x64.
Ok to commit ?
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: algo.patch
Type: text/x-patch
Size: 6687 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20210527/f3f54891/attachment.bin>
More information about the Libstdc++
mailing list