Boost logo

Boost Users :

Subject: [Boost-users] [date_time][serialization] Fast persistence of boost::date_time::ptime
From: Pete Bartlett (pete_at_[hidden])
Date: 2010-01-27 17:49:16


I am interested in serializing data structures like vector< pair<
boost::date_time::ptime , double> > as quickly as possible.

 

I see that ptime is a serializable object (in the Boost.Serialization sense)
but on the surface this implementation looks slow - we first get a date and
time_duration and then serialize the various components (mins,secs,subsecs)
separately for the latter and construct a full ISO string for the date.
Something faster is surely possible - digging into the implementation it
looks like a (non-special) ptime is represented as boost::uint64_t so if we
were privy to all implementation details we could use serialize that.
However on this glance this doesn't seem possible non-intrusively. Perhaps
I've missed something, perhaps there's a third way - I would be grateful if
any could share any ideas.

 

Thanks,

Pete

 

 



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net