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

take control of exception object creation #4669

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidhewitt
Copy link
Member

The idea of this PR is to move exception creation out of the Python interpreter (where we can't control it, e.g. all the special cases in #4412), into our own code.

I think this would pave the way for optimisations and maybe relates to #4584 and #4413.

Having started on this, I think for 0.23 it's going to be simpler to just introduce some locking inside PyErr, however I would like to revisit this in the future as I think it will be a positive step. So for now I'm just pushing to see impact on benchmarks & tests, and so I don't forget it.

Copy link

codspeed-hq bot commented Oct 30, 2024

CodSpeed Performance Report

Merging #4669 will degrade performances by 10.37%

Comparing davidhewitt:create-exception-objects (929056f) with main (f74d374)

Summary

❌ 1 regressions
✅ 82 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main davidhewitt:create-exception-objects Change
err_new_restore_and_fetch 7.7 µs 8.6 µs -10.37%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant