STINNER Victor added the comment: Ah yes, I began with the exact same change when I experimented optimizing to_bytes(): http://bugs.python.org/issue29300#msg286781
I was going to suggest you the same, but the speedup was low compared to the cost of parsing arguments. Anyway, int-to_bytes-from_bytes.patch is safe, LGTM, and the speedup is significant. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29421> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com