Message314769
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 |
|
Date |
User |
Action |
Args |
2018-04-01 10:29:26 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, brett.cannon, ncoghlan, benjamin.peterson, yselivanov |
2018-04-01 10:29:26 | serhiy.storchaka | set | messageid: <1522578566.75.0.467229070634.issue33200@psf.upfronthosting.co.za> |
2018-04-01 10:29:26 | serhiy.storchaka | link | issue33200 messages |
2018-04-01 10:29:26 | serhiy.storchaka | create | |
|