* D'Arcy J.M. Cain (darcy@druid.net) wrote:
> The benefit of the money type is speed. Because internal operations
> are done on integers they can generally be handled by single CPU ops.
> My tests on the 64 bit version show 10% to 25% improvement over numeric
> for many operations.
Erm, the numeric is doing integer ops too mostly, no? Perhaps I'm
missing something here.. What *exactly* makes it faster than numeric,
and why couldn't numeric use that improvement? The one thing I can
think of right off would be having a 64bit-base numeric type instead of
the current 32bit-base (which limits us to base-10,000 while 64bit would
give us base-1,000,000,000, which means more done in one operation and
so less work overall- *if* you can do fast 64bit integer operations,
which isn't necessairly the case on all architectures...).
If that's where the improvment is then let's add a 'numeric64' type.
Thanks,
Stephen