Skip to content

bpo-46953: use FASTCALL for __import__ builtin #31752

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

Merged
merged 1 commit into from
Mar 11, 2022

Conversation

kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Mar 8, 2022

Benchmark:

import pyperf

runner = pyperf.Runner()
runner.timeit(name="bench __import__",
              stmt="__import__('asyncio')",)

Result:

Mean +- std dev: [base] 191 ns +- 16 ns -> [patch] 112 ns +- 11 ns: 1.71x faster

https://bugs.python.org/issue46953

@kumaraditya303 kumaraditya303 changed the title use FASTCALL for __import__ builtin bpo-46953: use FASTCALL for __import__ builtin Mar 8, 2022
@kumaraditya303 kumaraditya303 marked this pull request as ready for review March 8, 2022 07:53
@AlexWaygood AlexWaygood added performance Performance or resource usage type-feature A feature request or enhancement labels Mar 8, 2022
@asvetlov asvetlov merged commit 6f3b9e2 into python:main Mar 11, 2022
@kumaraditya303 kumaraditya303 deleted the __import__ branch March 11, 2022 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage skip news type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants