Skip to content

Commit 63fa1cf

Browse files
rhettingermiss-islington
authored andcommitted
bpo-32492: Add missing whatsnew entries for itemgetter and namedtuple (GH-11897)
https://bugs.python.org/issue32492
1 parent 3ff5962 commit 63fa1cf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Doc/whatsnew/3.8.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,17 @@ Optimizations
359359

360360
* :class:`uuid.UUID` now uses ``__slots__`` to reduce its memory footprint.
361361

362+
* Improved performance of :func:`operator.itemgetter` by 33%. Optimized
363+
argument handling and added a fast path for the common case of a single
364+
non-negative integer index into a tuple (which is the typical use case in
365+
the standard library). (Contributed by Raymond Hettinger in
366+
:issue:`35664`.)
367+
368+
* Sped-up field lookups in :func:`collections.namedtuple`. They are now more
369+
than two times faster, making them the fastest form of instance variable
370+
lookup in Python. (Contributed by Raymond Hettinger, Pablo Galindo, and
371+
Serhiy Storchaka in :issue:`32492`.)
372+
362373
* The :class:`list` constructor does not overallocate the internal item buffer
363374
if the input iterable has a known length (the input implements ``__len__``).
364375
This makes the created list 12% smaller on average. (Contributed by Pablo

0 commit comments

Comments
 (0)