Antoine Pitrou <pit...@free.fr> added the comment: Serhiy:
> The relative speed up looks nice. But it is just few microseconds per class. > You have to create many thousands of classes to gain a significant fraction > of second. This work started with your message in https://mail.python.org/pipermail/python-dev/2017-December/151277.html pointing out that we shouldn't add tp_ slots because it makes type creation and Python initialization slower (*), so I'm a bit surprised that you're now claiming speeding up type creation (by up to 3x!) is not important... (*) To quote: ''' 2. Increased class initialization time. For every class for every slot we need to look up corresponding methods in dictionaries of the class itself and all its parents (caching doesn't work fine at this stage). Significant part of class initialization time is spent on initializing slots. This will increase the startup time and the time of creating local classes. The relative overhead is more significant in Cython. ''' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32346> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com