On 15 Jan 2009, at 20:17, Jim Starkey wrote:
Antony Curtis wrote:
On Thursday, January 15, 2009, at 01:56PM, "Jim Starkey" <[email protected]
> wrote:
Jay Pipes wrote:
Roland Bouman wrote:
Hi!
On Thu, Jan 15, 2009 at 9:30 PM, Brian Aker <[email protected]>
wrote:
I thought that this might make for a nice comparison:
http://www.sqlite.org/datatype3.html
Not much :)
Indeed. I'd say...too little.
Really - there has to be DECIMAL and DATETIME (or else DATE and
TIMESTAMP)
Agreed, although DECIMAL in Drizzle/MySQL is really a text
field... (shhh, don't tell anybody!)
Oh, I don't think so. Better look again. It's not text, it's not
binary, and it certainly isn't pretty. It does compare naturally,
though.
MySQL hasn't used plain text to store decimals for quite some
time... it has had a base 10^9 representation for it's decimal
type. I think it was introduced in the 4.1 era or maybe 5.0 but I
cannot remember right now.
Each 32bit word stores a binary number from 0 to 999999999.
Yes, well, sort of. It's actually two variable length vectors, one
for the "digits" to the left of the decimal point, the other the
number of "digits" to the right of the decimal point. It's clear
that the fellow who designed it missed school on the day they
covered bases.
A more intelligent, denser, faster, and more intuitive format would
use a single vector of binary words. On a challenge from Monty
(W.), I did a relative performance measure between the Falcon
decimal type and the "server" type. The worst case (> 18 decimal
digits of precision) showed Falcon 40% faster. For anything less
than 18 decimal digits of precision, Falcon was approximately
infinitely faster (Falcon uses a 64 bit int with a decimal scale
factor).
I have never felt the need to dig into its implementation issues... I
kinda simply assumed that when it went in, that there must have been
some real good reason why one of the existing GPL or BSD big number
libraries wasn't selected.
<snip>
Personally, I didn't like it because it added more methods to the
already overloaded and overcomplicated Item classes. Every time I see
an "if" or "switch" statement with a const argument, my mind wonders
why wasn't object orientation used instead...
Regards,
Antony.
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp