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

moonbitlang / core / 6546
89%

Build:
DEFAULT BRANCH: main
Ran 04 Sep 2026 03:02AM UTC
Jobs 1
Files 442
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

04 Sep 2026 03:00AM UTC coverage: 89.19%. Remained the same
6546

push

github

bobzhang
perf(bigint): batch digits in to_string_radix for non-power-of-two radixes

Closes #3827. The generic radix path extracted one digit per full
BigInt division (grade_school_div per output digit, O(n^2) overall).
Generalize the radix-10 algorithm already used by to_string: convert
limb-by-limb into base chunk = radix^chunk_len slots using only Int64
arithmetic, with chunk chosen as the largest power keeping
(slot << RADIX_BIT_LEN) | limb inside Int64, then emit chunk_len
digits per slot into a pre-sized buffer. Also drops the -self
magnitude copy the old path made for negative inputs.

Native release benchmarks on a ~4000-bit value (committed):
- radix=7:  1.28 ms -> 83 us (~15x)
- radix=36: 762 us -> 95 us (~8x)
- both now match the optimized radix-10 path (~105 us) as expected

New tests: known values for radixes 3/6/36, from_string round-trips
for ten non-power-of-two radixes on a 700+ bit value (positive and
negative), and radix-3 digit-length checks across chunk boundaries
(3^e for e around 19 and 38).
Reviewed by Codex CLI (codex-cli 0.144.1): "Approved; no findings" —
with an explicit Int64 overflow bound derivation, slot-count and
pos-underflow checks, sign-magnitude equivalence for negatives, and an
independent 7,650-case differential check across all 30 applicable
radixes.

Signed-off-by: Codex CLI <codex@openai.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

16205 of 18169 relevant lines covered (89.19%)

276020.74 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6546.1 04 Sep 2026 03:02AM UTC 443
89.21
GitHub Action Run
Source Files on build 6546
  • Tree
  • List 442
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9d45a74c on github
  • Prev Build on main (#6543)
  • Next Build on main (#6550)
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