[Python-Dev] Review request: optimizing typing ABC caches
Ivan Levkivskyi
levkivskyi at gmail.com
Sat Feb 4 04:59:34 EST 2017
More information about the Python-Dev mailing list
Sat Feb 4 04:59:34 EST 2017
- Previous message (by thread): [Python-Dev] Top python roles
- Next message (by thread): [Python-Dev] User + sys time bigger than real time, in case of no real parallelism
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
There is a PR implementing typing ABC cache optimization: https://github.com/python/typing/pull/383 The main idea is straightforward: subscripted generic ABCs like Iterable[int], Iterable[str], etc. should not have separate ABC caches (positive and negative), since they all are equivalent to plain Iterable at runtime. It is proposed that they will share their caches with a parent ABC from abc module for abstract collections, or with original (unsubscripted) class generic for concrete classes. Inada-san confirmed that this optimization reduces the memory footprint. I will be grateful for a code review. Best regards, Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20170204/45e2d2cf/attachment.html>
- Previous message (by thread): [Python-Dev] Top python roles
- Next message (by thread): [Python-Dev] User + sys time bigger than real time, in case of no real parallelism
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list