| commit | ad1d5908ada171eff768291371a80022bfad4f04 | [log] [tgz] |
|---|---|---|
| author | Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com> | Fri Jan 07 22:47:58 2022 -0500 |
| committer | GitHub <noreply@github.com> | Fri Jan 07 21:47:58 2022 -0600 |
| tree | 040c1e3391995791c8114ea62c911756ad824c68 | |
| parent | 6fa8b2ceee38187b0ae96aee12fe4f0a5c8a2ce7 [diff] |
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).