Author levkivskyi
Recipients barry, levkivskyi
Date 2017-09-03.20:54:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za>
In-reply-to
Content
The idea is that creating ABCs is approximately twice slower than normal classes. Plus there are smaller penalties for various operations with ABCs. This mostly influences the Python interpreter start-up time (because of extensive use of ABCs in importlib), and start-up times of programs that extensively use ABCs.

The situation can be improved by rewriting ABCMeta in C. I have a working implementation, but it is far form being ready and still needs some polishing and optimizations (in particular _abc_cache and friends).

Already at this stage I have one question (I will add more when they appear while I am finishing the implementation): is it OK to make _abc_cache, _abc_negative_cache, _abc_negative_cache_version, and _abc_registry read-only? The point is that I want to prohibit something like this:

    MyABC._abc_cache = "Surprise on updating the cache!"

thus avoiding many PySet_Check(...) calls. These attributes are not documented and start with underscore.
History
Date User Action Args
2017-09-03 20:54:21levkivskyisetrecipients: + levkivskyi, barry
2017-09-03 20:54:21levkivskyisetmessageid: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za>
2017-09-03 20:54:21levkivskyilinkissue31333 messages
2017-09-03 20:54:21levkivskyicreate