[Mono-bugs] [Bug 622127] New: System.DateTime could be better encoded (64 bits instead of 64+32)
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Jul 14 00:36:51 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=622127
http://bugzilla.novell.com/show_bug.cgi?id=622127#c0
Summary: System.DateTime could be better encoded (64 bits
instead of 64+32)
Classification: Mono
Product: Mono: Class Libraries
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: miguel at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Our DateTime evolved slowly without understanding the underlying principles
that drove the original design.
In Mono's implementation we keep the date as a TimeSpan created from a 64-bit
int "ticks" as well as "kind" property that determines the kind of encoding
(this came from NET_2_0).
We could reimplement DateTime entirely on top of the 64-bit long as
DateTime.ToBinary returns a 64-bit long that fully encodes the datetime with
its kind. The DateTime.FromBinary is the equivalent function that creates a
DateTime from an encoded binary.
So we could be saving both a lot of gratuitous bookkeeping as well as one int
for each DateTime in the system.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list