[New-bugs-announce] [issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions
Eric Martin
report at bugs.python.org
Wed Feb 10 19:15:07 EST 2021
New submission from Eric Martin <eric.martin at unsw.edu.au>:
Run on a MacBook Pro (15-inch, 2019)
2.3 GHz 8-Core Intel Core i9
16 GB 2400 MHz DDR4
Python 3.8.7 (default, Dec 24 2020, 19:07:18)
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from timeit import timeit
>>> S = set(range(10_000))
>>> timeit('S.remove(5000); S.add(5000)', globals=globals(), number=100_000)
0.01933291699999984
$ python3.9
Python 3.9.1 (default, Dec 8 2020, 13:10:53)
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from timeit import timeit
>>> S = set(range(10_000))
>>> timeit('S.remove(5000); S.add(5000)', globals=globals(), number=100_000)
3.8517225489999998
----------
components: Interpreter Core
messages: 386815
nosy: eamartin
priority: normal
severity: normal
status: open
title: Operations on sets more than hundred times less efficient with python3.9 than with previous versions
type: performance
versions: Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43198>
_______________________________________
More information about the New-bugs-announce
mailing list