Skip to content

Use GMP factor removal for decimals - #146

Merged
terror merged 1 commit into
masterfrom
perf/gmp-factor-removal
Aug 1, 2026
Merged

Use GMP factor removal for decimals#146
terror merged 1 commit into
masterfrom
perf/gmp-factor-removal

Conversation

@terror

@terror terror commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Replaces repeated factor-removal loops in decimal conversion with GMP-backed remove_factor_mut. Stack-backed MiniInteger factors avoid additional heap allocations.

Criterion results for non-terminating denominators with large powers of 2 and 5:

Denominator Before After Speedup
3 * 2^100 2.00 us 636 ns 3.1x
3 * 2^1000 36.0 us 698 ns 51.6x
3 * 5^100 3.85 us 1.07 us 3.6x
3 * 5^1000 181 us 2.93 us 61.7x

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.45%. Comparing base (bba9769) to head (70d3b13).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #146      +/-   ##
==========================================
- Coverage   78.49%   78.45%   -0.04%     
==========================================
  Files          29       29              
  Lines        3520     3514       -6     
==========================================
- Hits         2763     2757       -6     
  Misses        757      757              
Flag Coverage Δ
unit 78.45% <100.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@terror
terror merged commit 593ff43 into master Aug 1, 2026
6 checks passed
@terror
terror deleted the perf/gmp-factor-removal branch August 1, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants