-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Repeated __import__
is much slower than on CPython
#4951
Comments
there is a fast path for importing written in rpython, in |
Testing on Linux (WSL), PyPy is only 5x-10x slower than CPython. On Windows, it's 500x slower, even with antivirus disabled. Trying to figure out why. |
@devdanzin but even on linux |
I have now written a quick prototype on the |
I've merged the fast path, let's check tomorrow's nightly whether the situation improved. |
The Linux nightly at pypy-c-jit-183898-9064d3c9091e-linux64.tar.bz2 is fixed:
Compared to:
The time taken for repeated |
wonderful, thanks for checking @devdanzin! if the module is not in |
As predicted, performance improvement on Windows is impressive:
|
On PyPy, repeatedly calling
__import__
(that is, for a module that is already insys.modules
) is much slower than on CPython:With the following test script:
This seems to be the root cause of #1423.
The text was updated successfully, but these errors were encountered: