alloy-rs
ruint
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Optimizations
Branches
Benchmarks
Runs
Performance History
Latest Results
perf: stop the pow base check at the first nonzero limb ORing every high limb loads all of them up front. For `U4096` LLVM keeps the 64 limbs in registers, spills them, and then copies the base limb by limb inside the general loop, which CodSpeed measured as a 25% slower `overflowing_pow/4096`. Test the low limb first and return at the first nonzero high limb, which keeps the loop's codegen close to main's.
dani/pow-power-of-two
17 minutes ago
chore: narrow the #676 changelog entry
dani/pow-power-of-two
30 minutes ago
perf: test only single-limb bases for the pow shift `is_power_of_two` counts the bits of every limb, which on aarch64 moves each limb through the vector unit: on an M4 Max other `EXP` bases got 21% slower. The bases that matter, 256 and 2, fit in one limb, so check that the high limbs are zero and that the low limb is a power of two. Larger powers of two take the general loop.
dani/pow-power-of-two
33 minutes ago
perf: leave the general pow loop as on main Skipping the final squaring did not pay off on an M4 Max: with main's loop shape, 64-bit `pow` latency rose 25% and other `EXP` bases lost latency too, and the bottom-up and top-down rewrites each regressed other cases. Keep main's loop and only add the power of two path.
dani/pow-power-of-two
38 minutes ago
perf: keep the pow loop shape of main The bottom-up loop that tracked bit indices still ran more instructions per step than main's loop on aarch64: 64-bit `pow` went from 132 to 218 instructions per call on an M4 Max, and other bases lost latency to the `bit_len` computation at the start. Go back to main's loop, which shifts the exponent right by one each step, and only move the squaring after the zero check, so it skips the final squaring. Every squaring is followed by another multiplication of the result, so `overflowing_pow` still only ORs the step overflows.
dani/pow-power-of-two
42 minutes ago
perf: keep pow squaring bottom up Squaring and multiplying from the top bit puts both multiplications of every step on one dependency chain, and LLVM multiplies by one for clear bits instead of branching. CodSpeed measured `pow/64` and `pow/128` 31% to 54% slower. Going from the bottom bit up again keeps the squarings and the result multiplications on separate chains, and still skips the final squaring and the shift of the exponent. Every squaring feeds the multiplication by the top bit, so `overflowing_pow` still only ORs the step overflows.
dani/pow-power-of-two
50 minutes ago
perf: use the x86-64 div instruction in division Compute the reciprocal with one div instead of the MG10 refinement, and divide by a single limb with one div per limb instead of normalizing and multiplying by the reciprocal.
dani/reciprocal-last-carry
52 minutes ago
chore: link #675 in the changelog
dani/shift-by-uint
2 hours ago
Latest Branches
CodSpeed Performance Gauge
+63%
perf: raise powers of two with a shift in pow
#676
20 minutes ago
80870ff
dani/pow-power-of-two
CodSpeed Performance Gauge
+18%
perf: speed up div_rem on x86-64 and for n + 1 by n limbs
#674
2 hours ago
988e0c4
dani/reciprocal-last-carry
CodSpeed Performance Gauge
+26%
perf: shift by Uint and detect shift overflow with selects
#675
2 hours ago
5e72e8c
dani/shift-by-uint
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs