llvm-project/libcxx/include
Marco Gelmi 194d1965d2 Introduce branchless sorting functions for sort3, sort4 and sort5.
We are introducing branchless variants for sort3, sort4 and sort5.
These sorting functions have been generated using Reinforcement
Learning and aim to replace __sort3, __sort4 and __sort5 variants
for integral types.

The libc++ benchmarks were run on isolated machines for Skylake, ARM and
AMD architectures and achieve statistically significant improvement in
sorting random integers on test cases from sort1 to sort262144 for
uint32 and uint64.

A full performance overview for Intel Skylake, AMD and Arm can be
found here: https://bit.ly/3AtesYf

Reviewed By: ldionne, #libc, philnik

Spies: daniel.mankowitz, mgrang, Quuxplusone, andreamichi, philnik, libcxx-commits, nilayvaish, kristof.beyls

Differential Revision: https://reviews.llvm.org/D118029
2022-04-08 09:00:30 +02:00
..
__algorithm Introduce branchless sorting functions for sort3, sort4 and sort5. 2022-04-08 09:00:30 +02:00
__bit [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
__charconv [libc++] Revert "Protect users from relying on detail headers" & related changes 2022-03-01 08:20:24 -05:00
__chrono [NFC][libc++] Modularize chrono's calendar. 2022-04-06 17:47:53 +02:00
__compare [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
__concepts [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
__coroutine [libc++] Revert "Protect users from relying on detail headers" & related changes 2022-03-01 08:20:24 -05:00
__filesystem [libc++] Make __dir_stream visibility declaration consistent 2022-03-15 19:30:35 +01:00
__format Revert "[libc++][format] Use a helper constant." 2022-04-07 22:40:08 +02:00
__functional [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
__ios [libc++] Revert "Protect users from relying on detail headers" & related changes 2022-03-01 08:20:24 -05:00
__iterator [libc++][ranges] Implement changes to reverse_iterator from One Ranges Proposal. 2022-03-17 19:58:03 -07:00
__memory [libc++] Support arrays in make_shared and allocate_shared (P0674R1) 2022-04-06 08:42:55 -04:00
__numeric [libc++] Revert "Protect users from relying on detail headers" & related changes 2022-03-01 08:20:24 -05:00
__random [libc++] Define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER whenever we enable warnings in the test suite 2022-03-15 17:17:54 -04:00
__ranges [libc++] add global variable template std::views::empty 2022-04-05 18:18:16 +02:00
__support [libc++] Remove the ability to use the std::nullptr_t emulation in C++03 mode 2022-02-07 17:51:05 -05:00
__thread [libc++] Revert "Protect users from relying on detail headers" & related changes 2022-03-01 08:20:24 -05:00
__utility [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
__variant [libc++] Revert "Protect users from relying on detail headers" & related changes 2022-03-01 08:20:24 -05:00
experimental [libc++] Remove unused <iosfwd> include from <__debug> 2022-04-03 16:15:48 -04:00
ext [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
CMakeLists.txt [libc++][ranges] Implement ranges::count{, _if} 2022-04-07 15:18:14 +02:00
__assert [libcxx] Add flag to disable __builtin_assume in _LIBCPP_ASSERT 2022-04-07 09:00:31 -07:00
__availability [libc++] Add a lightweight overridable assertion handler 2022-03-23 15:35:46 -04:00
__bit_reference [libc++] Add `explicit` to a bunch of internal detail ctors. 2022-03-01 14:37:06 -05:00
__bits [libc++] Revert "Protect users from relying on detail headers" & related changes 2022-03-01 08:20:24 -05:00
__bsd_locale_defaults.h [libc++][NFC] Fix include guards and add a missing license header 2022-03-23 13:14:19 -04:00
__bsd_locale_fallbacks.h [libc++][NFC] Fix include guards and add a missing license header 2022-03-23 13:14:19 -04:00
__config [libc++] Remove error about _LIBCPP_ALTERNATE_STRING_LAYOUT not being supported anymore 2022-04-05 19:45:21 -04:00
__config_site.in [libc++] Add a lightweight overridable assertion handler 2022-03-23 15:35:46 -04:00
__debug [libc++] Remove unused <iosfwd> include from <__debug> 2022-04-03 16:15:48 -04:00
__errc [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
__hash_table [libc++] Audit all uses of _LIBCPP_ASSERT and _LIBCPP_DEBUG_ASSERT 2022-03-24 13:13:21 -04:00
__locale [libc++] Remove <utility> includes 2022-03-17 00:12:33 +01:00
__mbstate_t.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
__mutex_base [libc++] Revert "Protect users from relying on detail headers" & related changes 2022-03-01 08:20:24 -05:00
__node_handle [libc++] Revert "Protect users from relying on detail headers" & related changes 2022-03-01 08:20:24 -05:00
__split_buffer [libc++][NFC] Fix include guards and add a missing license header 2022-03-23 13:14:19 -04:00
__std_stream [libc++] Revert "Protect users from relying on detail headers" & related changes 2022-03-01 08:20:24 -05:00
__string [libc++] Remove raw call to debug handler from __char_traits_length_checked 2022-03-11 09:05:29 -05:00
__threading_support [libc++][NFC] Fix include guards and add a missing license header 2022-03-23 13:14:19 -04:00
__tree [libc++] Granularize <utility> includes 2022-03-05 19:31:46 +01:00
__tuple [libc++] Revert "Protect users from relying on detail headers" & related changes 2022-03-01 08:20:24 -05:00
__undef_macros [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
algorithm [libc++][ranges] Implement ranges::count{, _if} 2022-04-07 15:18:14 +02:00
any [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
array [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
atomic [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
barrier [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
bit [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
bitset [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cassert [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
ccomplex [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cctype [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cerrno [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cfenv [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cfloat [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
charconv [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
chrono [NFC][libc++] Modularize chrono's calendar. 2022-04-06 17:47:53 +02:00
cinttypes [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
ciso646 [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
climits [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
clocale [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cmath [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
codecvt [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
compare [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
complex [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
complex.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
concepts [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
condition_variable [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
coroutine [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
csetjmp [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
csignal [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cstdarg [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cstdbool [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cstddef [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cstdint [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cstdio [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cstdlib [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cstring [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
ctgmath [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
ctime [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
ctype.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
cuchar [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cwchar [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
cwctype [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
deque [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
errno.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
exception [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
execution [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
fenv.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
filesystem [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
float.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
format [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
forward_list [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
fstream [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
functional [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
future [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
initializer_list [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
inttypes.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
iomanip [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
ios [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
iosfwd [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
iostream [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
istream [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
iterator [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
latch [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
limits [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
limits.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
list [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
locale [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
locale.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
map [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
math.h [libc++][AIX] Use C++ overloads from libc++'s math.h 2022-03-01 15:53:41 -05:00
memory [libc++] Support arrays in make_shared and allocate_shared (P0674R1) 2022-04-06 08:42:55 -04:00
module.modulemap [libc++][ranges] Implement ranges::count{, _if} 2022-04-07 15:18:14 +02:00
mutex [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
new [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
numbers [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
numeric [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
optional [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
ostream [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
queue [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
random [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
ranges [libc++] add global variable template std::views::empty 2022-04-05 18:18:16 +02:00
ratio [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
regex [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
scoped_allocator [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
semaphore [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
set [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
setjmp.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
shared_mutex [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
span [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
sstream [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
stack [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
stdbool.h [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
stddef.h [libc++] Remove the ability to use the std::nullptr_t emulation in C++03 mode 2022-02-07 17:51:05 -05:00
stdexcept [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
stdint.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
stdio.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
stdlib.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
streambuf [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
string [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
string.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
string_view [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
strstream [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
system_error [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
tgmath.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
thread [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
tuple [libc++] Remove redundant __invoke_constexpr functions 2022-04-07 13:56:11 +02:00
type_traits [libc++] Remove redundant __invoke_constexpr functions 2022-04-07 13:56:11 +02:00
typeindex [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
typeinfo [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
uchar.h [libc++] Add missing header <cuchar> 2022-03-07 08:48:50 -05:00
unordered_map [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
unordered_set [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
utility [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
valarray [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
variant [libc++] Remove redundant __invoke_constexpr functions 2022-04-07 13:56:11 +02:00
vector [libc++] Ensure that all public C++ headers include <__assert> 2022-03-30 15:05:31 -04:00
version [libc++] Support arrays in make_shared and allocate_shared (P0674R1) 2022-04-06 08:42:55 -04:00
wchar.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00
wctype.h [libc++] Normalize all our '#pragma GCC system_header', and regression-test. 2022-02-04 12:27:19 -05:00