• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stillwater-sc / universal / 40047512831
89%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 24 Oct 2026 01:18AM UTC
Jobs 1
Files 761
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Oct 2026 12:57AM UTC coverage: 88.106% (+0.02%) from 88.083%
40047512831

push

github

web-flow
perf(efloat): Toom-3 multiplication and squaring above measured thresholds (#1815)

* perf(efloat): Toom-3 multiplication and squaring above measured thresholds

efloat_mpn::toom3_mul splits the operands in thirds at k = ceil(n / 3), evaluates them at 0,
1, -1, -2 and infinity by Bodrato's chain (p = a0 + a2, a(1) = p + a1, a(-1) = p - a1,
a(-2) = 2 (a(-1) + a2) - a0), multiplies the five pairs recursively on k limbs, the
evaluations' small top limbs added back by one-limb products as GMP's Toom codes do, and
interpolates by Bodrato's sequence in two's complement of 2k + 2 limbs: a halving is an
arithmetic shift, a third Jebelean's exact division by 3^-1 mod 2^64. mul_n takes it from 240
limbs for products and 352 for squares.

Measured, Toom-3 pays only from 256 limbs: products 2-16% faster there (9% at 512 limbs, 16% at
1024), squares 4-10% from 384; at 224 limbs and below Karatsuba is as fast or faster, so the
thresholds sit above it. At the efloat level a*b is 2.5% faster at 32768 bits and 5% at 65536,
and nothing changes up to 8192 bits: the gap there is Karatsuba's 16-limb schoolbook leaves
(69% of a 128-limb product, 1.24x GMP's assembly basecase) and its passes. An adcx/adox
basecase written with intrinsics was measured and dropped (g++ 1.5-1.7x slower, clang no
faster).

Products are exact, so every result is bit-identical by construction; a product sweep at 7680
to 32768 bits is identical to main in every mode.

Tests: limb_kernels gains VerifyToom3 (lengths either side of both thresholds, every n mod 3,
nested Toom-3 from 720 limbs, all-ones, zero-third, extreme-top and sparse operands, squares,
into a destination of garbage, and the exact division by 3 on values whose zero limbs meet a
carry). A mutation run catches 14 of 15; the survivor, the carry past a coefficient's span, can
only be zero in an exact product.

Resolves #1814

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(efloat): Toom-3's scratch comment; nested Toom-3... (continued)

118 of 118 new or added lines in 1 file covered. (100.0%)

54311 of 61643 relevant lines covered (88.11%)

9456584.43 hits per line

Jobs
ID Job ID Ran Files Coverage
1 40047512831.1 24 Oct 2026 01:18AM UTC 761
88.11
GitHub Action Run
Source Files on build 40047512831
  • Tree
  • List 761
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40047512831
  • 3ec8d722 on github
  • Prev Build on main (#40031136734)
  • Next Build on main (#40061163622)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc