]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109870: Dataclasses: batch up exec calls (gh-110851)
authorEric V. Smith <ericvsmith@users.noreply.github.com>
Mon, 25 Mar 2024 23:59:14 +0000 (19:59 -0400)
committerGitHub <noreply@github.com>
Mon, 25 Mar 2024 23:59:14 +0000 (19:59 -0400)
commit8945b7ff55b87d11c747af2dad0e3e4d631e62d6
tree1afa87c580d1cd001c096805eeb27da6f6a6bdc3
parent7ebad77ad65ab4d5d8d0c333256a882262cec189
gh-109870: Dataclasses: batch up exec calls (gh-110851)

Instead of calling `exec()` once for each function added to a dataclass, only call `exec()` once per dataclass. This can lead to speed improvements of up to 20%.
Lib/dataclasses.py
Misc/NEWS.d/next/Core and Builtins/2023-10-14-00-05-17.gh-issue-109870.oKpJ3P.rst [new file with mode: 0644]