[integer] Improve BigUInt multiplication by implementing Karatsuba algorithm
#97
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhancements multiplication of
BigUIntby implementing the Karatsuba algorithm.New
BigUIntFunctionality:src/decimojo/biguint/biguint.mojo: Added a new methodscale_up_by_power_of_billionto efficiently scale aBigUIntin-place by powers of a billion, enabling faster operations for specific use cases.raiseskeyword from the__iadd__method as it no longer throws exceptions.Benchmarking Enhancements:
benches/biguint/bench_biguint_multiply.mojo: Added benchmarks for new cases involving extremely large number multiplications (9000 digits * 9000 digits and 36000 digits * 36000 digits). Updated terminology for clarity. [1] [2]benches/biguint/bench_biguint_multiply_complexity.mojo: Introduced a comprehensive benchmark for analyzing multiplication time complexity across varying word sizes, including detailed logging and performance analysis.Configuration and Documentation Updates:
pixi.toml: Added a newdoccommand to generate documentation with validation and diagnostics, improving project maintainability.Miscellaneous Improvements:
benches/biguint/bench_biguint_multiply.mojo: Configured Python'ssysmodule to handle extremely large integers by settingint_max_str_digitsto 100,000.BigUIntcomparison where there are leading zero words.