Message302710
It optimizes the same cases as bpo-31410. bpo-31410 removed a half of the overhead for wrapper descriptors, Victor's patch removes the remaining half. Actually it makes calling the descriptor faster than calling the corresponding builtin! But bpo-31410 changes were simple, just few lines, and PR 3685 looks much more complex.
Are non-fast wrappers still needed? If the patch replaces the code instead of adding it this would decrease its cost. AFAIK the only descriptors that should support non-fast calling convention are __new__, __init__ and __call__.
As for practicality, this change should slightly speed up the code that directly calls __eq__, __lt__. For example classes decorated with total_ordering. Victor, can you provide microbenchmarks with more practical code? |
|
Date |
User |
Action |
Args |
2017-09-21 16:52:11 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, vstinner, methane |
2017-09-21 16:52:11 | serhiy.storchaka | set | messageid: <1506012731.37.0.714609641932.issue31543@psf.upfronthosting.co.za> |
2017-09-21 16:52:11 | serhiy.storchaka | link | issue31543 messages |
2017-09-21 16:52:11 | serhiy.storchaka | create | |
|