Message415455
There was a discussion here: https://github.com/faster-cpython/ideas/discussions/269
Checking for whether the assignment target is the left-hand side, rather than just checking for the right refcount, is more stable and reduces the number of deoptimizations, and even increases performance on some benchmarks.
Note that `PyUnicode_Append` is already a somewhat expensive function that already checks for the right reference counts, so it's fine to let as much code as possible get there, even if it will take the slow path -- we mostly just want to reduce allocations and avoid the quadratic string concatenation otherwise. |
|
Date |
User |
Action |
Args |
2022-03-17 22:44:38 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, brandtbucher |
2022-03-17 22:44:38 | Dennis Sweeney | set | messageid: <1647557078.86.0.480735606049.issue47053@roundup.psfhosted.org> |
2022-03-17 22:44:38 | Dennis Sweeney | link | issue47053 messages |
2022-03-17 22:44:38 | Dennis Sweeney | create | |
|