Skip to content

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Dec 4, 2023

Uses a more efficient squaring algorithm with fewer iterations, with an implementation shared with Uint.

Proptested against num-bigint.

Uses a more efficient squaring algorithm with fewer iterations, with an
implementation shared with `Uint`.

Proptested against `num-bigint`.
@tarcieri tarcieri merged commit cd9cdce into master Dec 4, 2023
@tarcieri tarcieri deleted the boxed-uint/more-efficient-square branch December 4, 2023 15:34
tarcieri added a commit that referenced this pull request Dec 4, 2023
This reverts commit cd9cdce.

Benchmarks reveal this caused a performance regression to modpow.
Reverting it yields the following improvement:

Montgomery arithmetic/modpow, BoxedUint^BoxedUint
                        time:   [76.362 µs 76.381 µs 76.403 µs]
                        change: [-72.846% -72.795% -72.747%] (p = 0.00 < 0.05)
                        Performance has improved.
tarcieri added a commit that referenced this pull request Dec 4, 2023
This reverts commit cd9cdce.

Benchmarks reveal this caused a performance regression to modpow.
Reverting it yields the following improvement:

Montgomery arithmetic/modpow, BoxedUint^BoxedUint
                        time:   [76.362 µs 76.381 µs 76.403 µs]
                        change: [-72.846% -72.795% -72.747%] (p = 0.00 < 0.05)
                        Performance has improved.
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