28 Feb
2002
28 Feb
'02
10:30 p.m.
[Jim Fulton]
ZODB has a TimeStamp type that uses a 32-bit unsigned integer to store year, month,, day, hour, and minute in a way that makes it dirt simple to extract a component.
[Tim]
You really think so? It's a mixed-radix scheme:
v=((((y-1900)*12+mo-1)*31+d-1)*24+h)*60+m;
so requires lots of expensive integer division and remainder ...
[Jim]
Compared to storing date-times as offsets from an epoch, this is much simpler and cheaper.
OK, as with most things, it boils down to the definition of dirt: you're contrasting hard-packed dirt with a 21%-dirt 79%-concrete mix, and I'm constrasting hard-packed dirt with household dust. I'm sure you'll agree that's a rigorously correct summary <wink>.