Skip to content

take control of exception object creation#4669

Draft
davidhewitt wants to merge 1 commit into
PyO3:mainfrom
davidhewitt:create-exception-objects
Draft

take control of exception object creation#4669
davidhewitt wants to merge 1 commit into
PyO3:mainfrom
davidhewitt:create-exception-objects

Conversation

@davidhewitt

Copy link
Copy Markdown
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.

@codspeed-hq

codspeed-hq Bot commented Oct 30, 2024

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #4669 will degrade performances by 10.37%

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

Summary

❌ 1 regression
✅ 80 untouched

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

Benchmarks breakdown

Benchmark BASE HEAD 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