[all-commits] [llvm/llvm-project] 865ad6: [libc++] Use __libcpp_clz for a tighter __log2i fu...
Hans via All-commits
all-commits at lists.llvm.org
Fri May 27 09:58:36 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 865ad6bd21656aef5fabd2f4603ad4f759df6e62
https://github.com/llvm/llvm-project/commit/865ad6bd21656aef5fabd2f4603ad4f759df6e62
Author: Hans Wennborg <hans at chromium.org>
Date: 2022-05-27 (Fri, 27 May 2022)
Changed paths:
M libcxx/include/__algorithm/sort.h
Log Message:
-----------
[libc++] Use __libcpp_clz for a tighter __log2i function
While looking at D113413 I noticed that __log2i could perhaps be
improved to be both slightly smaller and faster.
projects/libcxx/benchmarks/sort.libcxx.out --benchmark_filter=BM_Sort_uint32_QuickSortAdversary*
suggests this is performance neutral, but it shaves a few bytes off the
benchmark binary, and even more off a Chromium build.
Differential revision: https://reviews.llvm.org/D125958
More information about the All-commits
mailing list