add Bound constructors for PyByteArray and PyMemoryView#3786
add Bound constructors for PyByteArray and PyMemoryView#3786davidhewitt merged 2 commits intoPyO3:mainfrom
Bound constructors for PyByteArray and PyMemoryView#3786Conversation
CodSpeed Performance ReportMerging #3786 will improve performances by 12.92%Comparing Summary
Benchmarks breakdown
|
davidhewitt
left a comment
There was a problem hiding this comment.
Brilliant, thank you yet again! Good pick to choose these ones; I'd totally forgotten they needed constructors added still.
Since the original from constructor used as_ptr(), which returns a borrowed ptr, I used a borrowed &Bound for the new one. Please correct me if I'm wrong here.
&Bound is exactly right based on what we've been doing elsewhere 👍
Just one tiny detail which is a suggestion to improve the surrounding code a tiny bit while we're there...
|
Btw, if you are interested in some reviewing as well as coding, I've started keeping a list on #3684, some help getting those reviewed and merged would go a long way towards getting this new API shipped! |
I'll have a look and leave some comments. |
Part of #3684
The adds the
Boundconstructors forPyByteArrayandPyMemoryView.Since the original
fromconstructor usedas_ptr(), which returns a borrowed ptr, I used a borrowed&Boundfor the new one. Please correct me if I'm wrong here.