[all-commits] [llvm/llvm-project] bc10a4: [libc][math] Improve the performance and error pri...
lntue via All-commits
all-commits at lists.llvm.org
Tue Nov 15 11:18:36 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bc10a4108055eb169b8026b8d9bf618025bbedb8
https://github.com/llvm/llvm-project/commit/bc10a4108055eb169b8026b8d9bf618025bbedb8
Author: Tue Ly <lntue at google.com>
Date: 2022-11-15 (Tue, 15 Nov 2022)
Changed paths:
M libc/src/__support/CMakeLists.txt
M libc/src/__support/UInt.h
A libc/src/__support/integer_utils.h
A libc/src/__support/number_pair.h
M libc/test/src/__support/uint128_test.cpp
M libc/utils/UnitTest/LibcTest.cpp
M utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Log Message:
-----------
[libc][math] Improve the performance and error printing of UInt.
Use add_with_carry builtin to improve the performance of
addition and multiplication of UInt class. For 128-bit, it is as
fast as using __uint128_t.
Microbenchmark for addition:
https://quick-bench.com/q/-5a6xM4T8rIXBhqMTtLE-DD2h8w
Microbenchmark for multiplication:
https://quick-bench.com/q/P2muLAzJ_W-VqWCuxEJ0CU0bLDg
Microbenchmark for shift right:
https://quick-bench.com/q/N-jkKXaVsGQ4AAv3k8VpsVkua5Y
Microbenchmark for shift left:
https://quick-bench.com/q/5-RzwF8UdslC-zuhNajXtXdzLRM
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D137871
More information about the All-commits
mailing list