diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2026-02-04 19:41:41 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2026-02-04 19:47:11 +0100 |
| commit | e33bd4aaa2d6558fc1b008cd2e3bcc5c4f392be2 (patch) | |
| tree | d58b61aa9d6a023e8a19fe7fa7dc49a39a209a75 /include | |
| parent | cdcb4ce314531bfea23b844be7df28ab8c0818da (diff) | |
| download | busybox-w32-e33bd4aaa2d6558fc1b008cd2e3bcc5c4f392be2.tar.gz busybox-w32-e33bd4aaa2d6558fc1b008cd2e3bcc5c4f392be2.tar.bz2 busybox-w32-e33bd4aaa2d6558fc1b008cd2e3bcc5c4f392be2.zip | |
libbb: use narrow isqrt() when 64-bit one is not needed (only "factor" uses it)
function old new delta
isqrt_ull - 84 +84
create_J 1809 1808 -1
isqrt 106 38 -68
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 84/-69) Total: 15 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/libbb.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index aacff42ee..7cca925b9 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -408,7 +408,12 @@ unsigned FAST_FUNC bb_popcnt_long(unsigned long m); | |||
| 408 | #define bb_popcnt_long(m) bb_popcnt_32(m) | 408 | #define bb_popcnt_long(m) bb_popcnt_32(m) |
| 409 | #endif | 409 | #endif |
| 410 | 410 | ||
| 411 | unsigned long FAST_FUNC isqrt(unsigned long long N); | 411 | unsigned FAST_FUNC isqrt(unsigned long N); |
| 412 | #if LLONG_MAX > LONG_MAX | ||
| 413 | unsigned long FAST_FUNC isqrt_ull(unsigned long long N); | ||
| 414 | #else | ||
| 415 | # define isqrt_ull(N) isqrt(N) | ||
| 416 | #endif | ||
| 412 | 417 | ||
| 413 | unsigned long long monotonic_ns(void) FAST_FUNC; | 418 | unsigned long long monotonic_ns(void) FAST_FUNC; |
| 414 | unsigned long long monotonic_us(void) FAST_FUNC; | 419 | unsigned long long monotonic_us(void) FAST_FUNC; |
