]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-143445: Optimize deepcopy for 1.04x speedup (#143449)
authorHeikki Toivonen <308110+heikkitoivonen@users.noreply.github.com>
Thu, 8 Jan 2026 15:28:02 +0000 (07:28 -0800)
committerGitHub <noreply@github.com>
Thu, 8 Jan 2026 15:28:02 +0000 (16:28 +0100)
commitcea2d2475d3eec9f4fd350ef9eb2ba43da1943a5
treef840c875bf6c44c76e08248d09e9f84684ad4ae3
parent8cf5c4d89a526e5370f1d094885021b4792d4fff
gh-143445: Optimize deepcopy for 1.04x speedup (#143449)

Gains according to pyperformance:

```
deepcopy:
Mean +- std dev: 411 us +- 2 us -> 396 us +- 3 us: 1.04x faster
Significant (t=28.94)

deepcopy_reduce:
Mean +- std dev: 4.38 us +- 0.05 us -> 4.23 us +- 0.04 us: 1.04x faster
Significant (t=20.05)
```

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Lib/copy.py
Misc/ACKS
Misc/NEWS.d/next/Library/2026-01-05-12-20-42.gh-issue-143445.rgxnbL.rst [new file with mode: 0644]