Message108619
I am attaching a python prototype implementing interned UTC instance pickling. The patch is against sandbox revision r82218 of datetime.py.
Note that the pickling protocol requires that an instance or factory function is defined at the module level.
The pickle size saving is substantial:
>>> len(dumps(datetime.now(timezone.utc)))
61
>>> len(dumps(datetime.now(timezone.min)))
163
but there is still room for improvement:
>>> len(dumps(datetime.now()))
44
I do feel, however, that further improvements will see diminishing returns. |
|
Date |
User |
Action |
Args |
2010-06-25 19:29:19 | belopolsky | set | recipients:
+ belopolsky, fdrake, mark.dickinson |
2010-06-25 19:29:19 | belopolsky | set | messageid: <1277494159.76.0.528089411244.issue9051@psf.upfronthosting.co.za> |
2010-06-25 19:29:17 | belopolsky | link | issue9051 messages |
2010-06-25 19:29:17 | belopolsky | create | |
|