This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eamartin
Recipients eamartin
Date 2021-02-11.00:15:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1613002507.49.0.48232719319.issue43198@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-02-11 00:15:07eamartinsetrecipients: + eamartin
2021-02-11 00:15:07eamartinsetmessageid: <1613002507.49.0.48232719319.issue43198@roundup.psfhosted.org>
2021-02-11 00:15:07eamartinlinkissue43198 messages
2021-02-11 00:15:07eamartincreate