Serhiy Storchaka added the comment: For a namedtuple such as turtle.Vec2D there is no significant difference in the time of unpickling. But for simpler type it is.
$ ./python -m timeit -s 'import pickle, turtle; global I' -s 'class I(int): pass' -s 'p = pickle.dumps([I(i) for i in range(1000)], 3)' -- 'pickle.loads(p)' Before: 1000 loops, best of 3: 1.6 msec per loop After: 1000 loops, best of 3: 1.82 msec per loop So I withdraw my patch. Unpickling performance is more important than pickling performance, and status quo wins. Sorry for the noise. ---------- assignee: -> serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23419> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com