gcc/libstdc++-v3/testsuite/performance
François Dumont ba23e045fc 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  <john.chang@samba.tv>

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.
2020-11-20 22:25:04 +01:00
..
20_util/memory_resource Implement std::pmr::synchronized_pool_resource 2018-11-17 23:35:44 +00:00
21_strings Update copyright years. 2020-01-01 12:51:42 +01:00
22_locale Update copyright years. 2020-01-01 12:51:42 +01:00
23_containers Update copyright years. 2020-01-01 12:51:42 +01:00
25_algorithms libstdc++: Limit memory allocation in stable_sort/inplace_merge (PR 83938) 2020-11-20 22:25:04 +01:00
26_numerics libstdc++: Add performance test for <random> 2020-10-09 14:01:54 +01:00
27_io Update copyright years. 2020-01-01 12:51:42 +01:00
28_regex Update copyright years. 2020-01-01 12:51:42 +01:00
30_threads/future Update copyright years. 2020-01-01 12:51:42 +01:00
ext/pb_ds Update copyright years. 2020-01-01 12:51:42 +01:00