Stefan Behnel added the comment: Here is an incremental patch that adds fast paths for adding and subtracting 0.
Question: the module calls long_long() in some places (e.g. long_abs()) and thus forces the return type to be exactly a PyLong and not a subtype. My changes use a plain "incref+return input value" in some places. Should they call long_long() on it instead? ---------- Added file: http://bugs.python.org/file36734/add_sub_0_fast_path.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22501> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com