Use the new bound API instead of .as_ref(py)#3853
Conversation
CodSpeed Performance ReportMerging #3853 will degrade performances by 16.65%Comparing 🎉 Hooray!
|
| Benchmark | main |
LilyFoote:replace-as-ref-with-bind |
Change | |
|---|---|---|---|---|
| ⚡ | mapping_from_dict |
355.6 ns | 300 ns | +18.52% |
| ❌ | extract_float_downcast_success |
425.6 ns | 508.9 ns | -16.38% |
| ❌ | extract_float_extract_success |
417.2 ns | 500.6 ns | -16.65% |
| ⚡ | sequence_from_list |
355.6 ns | 300 ns | +18.52% |
`to_str` is not available before Python 3.10 on the limited api.
Icxolu
left a comment
There was a problem hiding this comment.
Looks good to me! I marked a few spots, where I think we can relax lifetime constraints.
davidhewitt
left a comment
There was a problem hiding this comment.
Nice to clean these up, thanks! Just a few small thoughts... 👍
I was looking into the step of marking
Py::as_refas deprecated and while there's still some blockers, I was able to update to use the new api in a bunch of places.