STINNER Victor added the comment: The most complex slots are __new__, __init__ and __call__ because they accept keywords. It's hard to design a calling convention which optimize all cases because of the backward compatibility. The risk is to convert a dict to args + kwnames (tuple) and then back to a dict: two expensive and useless conversions.
It's my 3rd or 4th attempt to optimize new/init/call :-) My previous attempt was to add new tp_fastXXX slots to types, but again thr backward compatibilty was a major pain. https://bugs.python.org/issue29358 Here the scope is much small and backward compatibilty shouldn't affect us. I will try to find a way to optimize these slots as well and complete my patch. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31543> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com