-
Notifications
You must be signed in to change notification settings - Fork 51
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Replace if xxx is None:
with POP_JUMP_IF_NOT_NONE
?
#115
Comments
if xxx is None:
with POP_JUMP_IF_NOT_NONE ?if xxx is None:
with POP_JUMP_IF_NOT_NONE
?
|
See also #36 |
Thanks for writing the code and conducting the benchmarks! Unfortunately, 10% speedup on a microbenchmark usually means 0 real-world speedup, so depending on how complex the code is, I don't know if it's worth it :(. |
@penguin-wwy Is the code on a publicly visible branch? |
Moving to a discussion. @penguin-wwy if you want to contribute your code please open a PR and reference this issue or the resulting GitHub Discussion. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
These codes will be compiled to
I add new instr
POP_JUMP_IF_NOT_NONE
andPOP_JUMP_IF_NONE
to replace these:This is very effective for such a sample:
Call this function 1, 000, 000 times
After optimization, 10%+ speedup.
Result on pyperformance:
However, I am confused about, why
pickle_dict
is so slow ? This case is just calling the CFunction in the loop !The text was updated successfully, but these errors were encountered: