Skip to content

Conversation

@forfudan
Copy link
Owner

@forfudan forfudan commented Jul 7, 2025

This pull request introduces significant updates to the bench_biguint benchmarking suite, optimizes arithmetic operations in the BigUInt and BigDecimal modules, and refactors method names for clarity and consistency. Additionally, new benchmarking cases and constants are added to improve performance testing and support for larger numbers.

  1. Use SIMD to accelerate BigUInt addition and in-place addition. The speed gain is 2x to 4x for large numbers.
  2. Refine the BigUInt subtraction and in-place addition with some tricks on carry so that floor_divide and modulo are replaced by addition and subtraction.
  3. Use a trick to first do a paralelled addition word-by-word, and then do normalized carries with one loop.

Arithmetic Optimizations:

Refactoring and Enhancements:

Benchmarking Updates:

These changes collectively enhance the code's readability, scalability, and performance, especially for operations involving large numbers and benchmarking scenarios.

@forfudan forfudan merged commit 88e9f7b into main Jul 7, 2025
1 check passed
@forfudan forfudan deleted the work branch July 7, 2025 18:50
forfudan added a commit that referenced this pull request Jul 7, 2025
forfudan added a commit that referenced this pull request Jul 7, 2025
forfudan added a commit that referenced this pull request Jul 9, 2025
forfudan added a commit that referenced this pull request Jul 9, 2025
forfudan added a commit that referenced this pull request Jul 11, 2025
forfudan added a commit that referenced this pull request Jul 14, 2025
forfudan added a commit that referenced this pull request Jul 15, 2025
forfudan added a commit that referenced this pull request Jul 18, 2025
forfudan added a commit that referenced this pull request Jul 24, 2025
forfudan added a commit that referenced this pull request Jul 26, 2025
forfudan added a commit that referenced this pull request Jul 31, 2025
forfudan added a commit that referenced this pull request Aug 3, 2025
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