This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients Arfrever, Niklas.Claesson, Ramchandra Apte, andrewclegg, belopolsky, goshawk, lemburg, pitrou, r.david.murray, tim.peters, vstinner
Date 2014-07-15.02:53:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405392821.23.0.851273600966.issue15443@psf.upfronthosting.co.za>
In-reply-to
Content
Of course pickles come with overheads too - don't be tedious ;-)  The point is that the guts of the datetime pickling is this:

basestate = PyBytes_FromStringAndSize((char *)self->data,
                                       _PyDateTime_DATETIME_DATASIZE);

That consumes exactly 10 bytes today.  Add nanoseconds, and it will take at least 11 (if 4 bits are insanely squashed into the bytes currently devoted to microseconds), and more likely 12 (if nanoseconds are sanely given their own 2 bytes).  I suppose another possibility is to get rid of microseconds internally, and work with a single 4-byte nanosecond member.
History
Date User Action Args
2014-07-15 02:53:41tim.peterssetrecipients: + tim.peters, lemburg, belopolsky, pitrou, vstinner, Arfrever, r.david.murray, andrewclegg, Ramchandra Apte, goshawk, Niklas.Claesson
2014-07-15 02:53:41tim.peterssetmessageid: <1405392821.23.0.851273600966.issue15443@psf.upfronthosting.co.za>
2014-07-15 02:53:41tim.peterslinkissue15443 messages
2014-07-15 02:53:40tim.peterscreate