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 methane, pitrou, serhiy.storchaka, vstinner
Date 2017-09-21.16:52:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506012731.37.0.714609641932.issue31543@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2017-09-21 16:52:11serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner, methane
2017-09-21 16:52:11serhiy.storchakasetmessageid: <1506012731.37.0.714609641932.issue31543@psf.upfronthosting.co.za>
2017-09-21 16:52:11serhiy.storchakalinkissue31543 messages
2017-09-21 16:52:11serhiy.storchakacreate