Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add modular exponentiation benchmark #367

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

samuelbreckenridge
Copy link
Contributor

No description provided.

Copy link
Owner

@sampsyo sampsyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great; thanks!

@@ -46,6 +46,7 @@ The current benchmarks are:
* `mat-mul`: Multiplies two `nxn` matrices using the [naive][matmul] matrix multiplication algorithm. The matrices are randomly generated using a [linear congruential generator][rng].
* `max-subarray`: solution to the classic Maximum Subarray problem.
* `mod_inv`: Calculates the [modular inverse][modinv] of `n` under to a prime modulus p.
* `mod_pow`: Performs [modular exponentiation][modpow] using the right-to-left binary method as described in the Wikipedia article.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `mod_pow`: Performs [modular exponentiation][modpow] using the right-to-left binary method as described in the Wikipedia article.
* `mod_pow`: Performs [modular exponentiation][modpow] using the right-to-left binary method.

This already links to the Wikipedia article, so no need to say it again. 😃

@sampsyo sampsyo merged commit bcba6bb into sampsyo:main Jan 31, 2025
5 checks passed
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