diff options
author | Ivan Levkivskyi <levkivskyi@gmail.com> | 2018-02-18 12:41:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-18 12:41:58 (GMT) |
commit | 03e3c340a0156891a036d6dbdb9e348108826255 (patch) | |
tree | 5b897f150d3855868c7cf3c2fb1c7c6a313d4e31 /Misc | |
parent | 667b91a5e210e20946ad41f1796c544a1becf1b6 (diff) | |
download | cpython-03e3c340a0156891a036d6dbdb9e348108826255.zip cpython-03e3c340a0156891a036d6dbdb9e348108826255.tar.gz cpython-03e3c340a0156891a036d6dbdb9e348108826255.tar.bz2 |
bpo-31333: Re-implement ABCMeta in C (#5273)
This adds C versions of methods used by ABCMeta that
improve performance of various ABC operations.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-02-15-08-18-52.bpo-31333.4fF-gM.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-02-15-08-18-52.bpo-31333.4fF-gM.rst b/Misc/NEWS.d/next/Library/2018-02-15-08-18-52.bpo-31333.4fF-gM.rst new file mode 100644 index 0000000..63fc72a --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-02-15-08-18-52.bpo-31333.4fF-gM.rst @@ -0,0 +1,10 @@ +``_abc`` module is added. It is a speedup module with C implementations for +various functions and methods in ``abc``. Creating an ABC subclass and calling +``isinstance`` or ``issubclass`` with an ABC subclass are up to 1.5x faster. +In addition, this makes Python start-up up to 10% faster. + +Note that the new implementation hides internal registry and caches, previously +accessible via private attributes ``_abc_registry``, ``_abc_cache``, and +``_abc_negative_cache``. There are three debugging helper methods that can be +used instead ``_dump_registry``, ``_abc_registry_clear``, and +``_abc_caches_clear``. |