Skip to content

[integer] Refine the constructors of BigUInt#64

Merged
forfudan merged 6 commits intomainfrom
work
Mar 28, 2025
Merged

[integer] Refine the constructors of BigUInt#64
forfudan merged 6 commits intomainfrom
work

Conversation

@forfudan
Copy link
Copy Markdown
Owner

This pull request includes several changes to improve the functionality and performance of the BigUInt and BigInt benchmarks and arithmetic operations. The most important changes include adding a new benchmark for the BigUInt from_string constructor, modifying arithmetic functions to use a more efficient approach for handling word lists, and making adjustments to the BigInt initialization.

New Benchmark Addition:

Benchmark Command Updates:

  • benches/bigint/bench.mojo and benches/biguint/bench.mojo: Updated the input prompt to ask for the name of the benchmark instead of the number, and added the new fromstr benchmark option. [1] [2]

Arithmetic Function Improvements:

BigInt Initialization Adjustments:

  • src/decimojo/bigint/bigint.mojo: Adjusted the BigInt initialization to directly assign the magnitude using a list of words and updated the from_uint128 method to use BigUInt.from_scalar. [1] [2] [3]

@forfudan forfudan merged commit 7410089 into main Mar 28, 2025
1 check passed
@forfudan forfudan deleted the work branch March 28, 2025 11:49
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.

1 participant