Message108619
| Author |
belopolsky |
| Recipients |
belopolsky, fdrake, mark.dickinson |
| Date |
2010年06月25日.19:29:16 |
| SpamBayes Score |
2.0529245e-07 |
| Marked as misclassified |
No |
| Message-id |
<1277494159.76.0.528089411244.issue9051@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|