SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

72125 0 1 Python

bpo-46235: Do all ref-counting at once during list/tuple multiplication (GH-30346)

When multiplying lists and tuples by `n`, increment each element's refcount, by `n`, just once.

Saves `n-1` increments per element, and allows for a leaner & faster copying loop.

Code by  sweeneyde (Dennis Sweeney).
D
Dennis Sweeney committed
ad1d5908ada171eff768291371a80022bfad4f04
Parent: 6fa8b2c
Committed by GitHub <noreply@github.com> on 1/8/2022, 3:47:58 AM