Message301198
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. |
|
Date |
User |
Action |
Args |
2017-09-03 20:54:21 | levkivskyi | set | recipients:
+ levkivskyi, barry |
2017-09-03 20:54:21 | levkivskyi | set | messageid: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> |
2017-09-03 20:54:21 | levkivskyi | link | issue31333 messages |
2017-09-03 20:54:21 | levkivskyi | create | |
|