>On Thu, 24 Sep 1998 15:55:20 +0100, "James Sharman"
>>Some cycle counts for floating point and integer on teh pentium.
>>(int) ADD 1
>>(float) FADD 1-3
>>(int) DIV 17-41
>>(float) FDIV 39
>>(int) MUL 8-11
>>(float) MUL 1-3
>I was unable to easily find this information on the Intel developer site.
In one of the messages I've posted to this thread is the assembelr function
for obtaining exact number of cycles instructions can take;
for clear result you should call it with parameter size = 1 << (20...24) --
1-16 miilions
and then divide result on that number;
It works pretty good with integer instructions, but with FP you must be
careful not to overflow FPU stack and perform computations with valid
FP numbers (not a NaN's or others...)
(that was my mistake and because of it I posted incorrect figures for
FPU performance.... sorry )
Quote:>I'm wondering what the performance difference between 32bit
>floats and 64bit (double) floats is and what conversion between them
>costs,
You must be talking about C's float and double types. Well, I think
performance
penalty is only for storing twice as much data in case of doubles
(float is dword; double is two dwords and the long double is 10-byte);
The FPU internally works with 64-bit numbers (default), but can switched
to work with 53-bit or 24-bit accuracy, but the switching itself takes a
LOT of time and performance gain is zero.
CU
--
***> http://qdamage.webjump.com <*** Home site (some sources) ***