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

Speed up multiplication of Python numbers with small integers (<= 2**30) #2808

merged 1 commit into from
Jan 23, 2019


Copy link

@scoder scoder commented Jan 20, 2019

No description provided.

@scoder scoder added this to the 3.0 milestone Jan 20, 2019
@scoder scoder force-pushed the faster_pymultiply branch 4 times, most recently from cf2d692 to 9349b15 Compare January 22, 2019 17:51
Copy link
Contributor Author

scoder commented Jan 23, 2019

Benchmarks show that multiplying numbers in this range with other small Python numbers is up to 15% faster, with larger numbers still about 5% faster, and very large numbers about 1-5% slower (and clearly dominated by the multiplication algorithm).

@scoder scoder merged commit f19420a into master Jan 23, 2019
@scoder scoder deleted the faster_pymultiply branch April 23, 2020 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant