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

Used gmpy2 functions instead of the standard ones or the while-loops implemented in Python #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maximmasiutin
Copy link

The gmpy2 functions are from 50% to up to 400% faster. You can run your own benchmarks or run https://github.com/maximmasiutin/rsa-common-modulus/blob/main/test/benchmark-libs.py to find the real difference on your computer. I've run my tests on a notebook with Intel Core i7 1065G7 (AVX-512), gmpy2 version: 2.1.0b3, Python version: 3.8.5.

The most significant difference is between the gmpy2 invert(a, b) and Python's pow(a, -1, b).

…andard ones or implemented in Python via the while-loops
@GrosQuildu
Copy link
Owner

Thanks a lot! Will look at it soon.

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