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 function calls #43303
Comments
Results: 2.86% for 1 arg (len), 11.8% for 2 args trunk-speed$ ./python.exe -m timeit 'for x in trunk-clean$ ./python.exe -m timeit 'for x in pybench goes from 5688.00 down to 5598.00 Details about the patch: There are 2 unrelated changes. They both seem to The other change is more dangerous. It modifies It allocates 64 tuples of size 8 that are never This really needs comments added to the code. But I'm |
Logged In: YES I should note the numbers 64 and 8 are total guesses. It |
Logged In: YES The tuples should get deallocated when Py_Finalize is called. It would be good if there was (conditional) statistical I think it should be more stack-like, starting off with no For the other part, I think it would make the code more |
Logged In: YES v2 attached. You might not want to review yet. I mostly perf seems to be about the same. I'm not entirely sure the |
Logged In: YES This version actually works (in both normal and debug I modified to not preallocate and only hold a ref when the I still need to inline more of PyCFunction_Call. Speed is I'm not sure if I'll finish this before the sprint next |
Logged In: YES The performance gain for this patch (as-is) on Mac OS X i386 with a release |
Logged In: YES Interesting. I did the original work for this on an amd64 |
Logged In: YES This was v3 on a MacBook Pro running 10.4.6 (gcc 4, of course, since that's the |
Here is a patch applicable for SVN trunk. # With patch # Without patch |
I think Raymond might be interested. Since this is not a bug fix, it can only be considered for 3.x. |
Closing as terribly outdated (and not very promising). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: