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 serhiy.storchaka
Recipients benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, yselivanov
Date 2018-04-01.10:29:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522578566.75.0.467229070634.issue33200@psf.upfronthosting.co.za>
In-reply-to
Content
The following PR optimizes bytecode for the empty set "literal": {*()}.

Currently it is compiled to

    LOAD_CONST               0 (())
    BUILD_SET_UNPACK         1

It will optimized to

    BUILD_SET                0

$ ./python -m perf timeit --duplicate 1000 '{*()}'

Unpatched:  Mean +- std dev: 68.6 ns +- 1.1 ns
Patched:    Mean +- std dev: 31.8 ns +- 2.8 ns
History
Date User Action Args
2018-04-01 10:29:26serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, ncoghlan, benjamin.peterson, yselivanov
2018-04-01 10:29:26serhiy.storchakasetmessageid: <1522578566.75.0.467229070634.issue33200@psf.upfronthosting.co.za>
2018-04-01 10:29:26serhiy.storchakalinkissue33200 messages
2018-04-01 10:29:26serhiy.storchakacreate