[libcxx-commits] [PATCH] D118029: Introduce branchless sorting functions for sort3, sort4 and sort5.

Marco Gelmi via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 24 03:50:26 PST 2022


marcogelmi created this revision.
marcogelmi added reviewers: jdoerfert, minjaehwang, ldionne.
Herald added a subscriber: kristof.beyls.
marcogelmi requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118029

Files:
  libcxx/include/__algorithm/sort.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118029.402459.patch
Type: text/x-patch
Size: 7673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220124/2283097e/attachment.bin>


More information about the libcxx-commits mailing list