Depending on how your version of PG was built, there will probably be
hardly any difference in speed as far as the CPU is concerned as the
FPU should be happy with both, and I think MMX/MMX2/SSE/SSE2/3dNow!
have some relevant optimisations for that sort of thing as well. You
will be transferring twice as much data around though, so you might
max out your memory bandwidth sooner than you would otherwise. I
think the general recommendation is to use doubles over floats in
most cases for everything days.
Of course if you do find that your performance sucks with doubles,
FLOATs are only are a "quick" ALTER TABLE away if you don't need the
precision.
On 27 Jul 2005, at 23:08, jbduffy@xxxxxxxxxxxxx wrote:
Hi
I am wrting a application that involves a lot of floating point
number crunching.
My data is stored in tables of the form:
TABLE data (
date_id INT,
value FLOAT)
I have just noticed in the documention that the FLOAT data type is
stored
in 8 bytes (ie 64 bits) as opposed to the REAL data type which uses
4 bytes
(ie 32 bits).
All things being equal, does this mean that if I change my data
type to REAL
(and lose some precision) I will see a significant performance
increase on
my 32 bit Pentium 4?
Or, if I keep my data type as FLOAT will I see a significant
performance
increase by changing to a 64 bit CPU?
Regards
John Duffy
___________________________________________________________
Book yourself something to look forward to in 2005.
Cheap flights - http://www.tiscali.co.uk/travel/flights/
Bargain holidays - http://www.tiscali.co.uk/travel/holidays/
---------------------------(end of
broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that
your
message can get through to the mailing list cleanly
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq