-
Notifications
You must be signed in to change notification settings - Fork 825
add second lifetime to PyRef
and PyRefMut
#4720
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
base: main
Are you sure you want to change the base?
Conversation
04fadee
to
b3ca8c0
Compare
Thank you for making progress on this one. There's a measurable perf boost in the ordering operator benchmarks and I guess similarly this is a win for most Again the same thing that's paining me as in #4390 is I'm trying to think hard how we keep the API easy for users. Lifetimes scare Rust newbies enough, let alone two 😂 Are there any tricks we can play which avoid the complexity for the common case? Here's two I can think of:
(Given that we're wanting to revisit pyclass borrow checking and locking anyway, maybe we could add new types Opinions welcome to which, if any, of these ideas are not crazy 😂 |
Thanks for your thoughts!
That's certainly true. I agree that introducing The second option sounds very interesting. Switching the lifetime and introducing it via |
CodSpeed Performance ReportMerging #4720 will not alter performanceComparing 🎉 Hooray!
|
2367016
to
1f82315
Compare
6e1fa4b
to
a025fca
Compare
Co-authored-by: David Hewitt <[email protected]>
Companion to #4390