cpython/Misc/NEWS.d/next/Core and Builtins/2023-10-14-00-05-17.gh-issue-109870.oKpJ3P.rst
Eric V. Smith 8945b7ff55
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%.
2024-03-25 19:59:14 -04:00

3 lines
147 B
ReStructuredText

Dataclasses now calls :func:`exec` once per dataclass, instead of once
per method being added. This can speed up dataclass creation by up to
20%.