Skip to content

Pyerr value bound#3820

Merged
davidhewitt merged 19 commits intoPyO3:mainfrom
LilyFirefly:pyerr-value-bound
Feb 17, 2024
Merged

Pyerr value bound#3820
davidhewitt merged 19 commits intoPyO3:mainfrom
LilyFirefly:pyerr-value-bound

Conversation

@LilyFirefly
Copy link
Contributor

Implements more of the Bound api from #3684.

Follows on from #3819.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 11, 2024

CodSpeed Performance Report

Merging #3820 will degrade performances by 15.02%

Comparing LilyFoote:pyerr-value-bound (bb1701b) with main (c24478e)

Summary

⚡ 1 improvements
❌ 2 regressions
✅ 76 untouched benchmarks

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

Benchmarks breakdown

Benchmark main LilyFoote:pyerr-value-bound Change
list_via_downcast 157.2 ns 185 ns -15.02%
not_a_list_via_downcast 244.4 ns 216.7 ns +12.82%
sequence_from_tuple 232.8 ns 260.6 ns -10.66%

@LilyFirefly LilyFirefly marked this pull request as ready for review February 11, 2024 12:53
@LilyFirefly LilyFirefly mentioned this pull request Feb 11, 2024
@davidhewitt
Copy link
Member

Thanks so much for continuing onto this and also the follow-on in #3826 .

I'll hold off on reviewing this just until it's rebased post merge of #3819. (I also have quite a few things I'm trying to finish up this evening...)

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Feb 11, 2024
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for picking this one up!

Quite a few comments here, mostly related to removing .clone() to avoid the reference counting cycles when we can, for efficiency wins 😄

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whew, getting there, thanks for the iterations! This one has turned out to be quite fiddly.

I think the biggest thing remaining is whether from_value_bound should just take Bound instead of &Bound; I think if you agree with that idea then it'll lead to a few more changes 🙈

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're there! There's just a few stylistic nits, and then let's merge this. Thank you for the several rounds of iteration on this one; turned out to have quite a few design points!

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@davidhewitt davidhewitt added this pull request to the merge queue Feb 17, 2024
Merged via the queue into PyO3:main with commit 940804f Feb 17, 2024
@LilyFirefly LilyFirefly deleted the pyerr-value-bound branch February 17, 2024 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-skip-changelog Skip checking changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants