|
|
On Tue, 23 Nov 1999 13:34:36 -0500, Dick Balaska wrote:
>Thorsten Froehlich wrote:
>>
>> In article <3820f651@news.povray.org> , "Chris Jeppesen"
>> <chr### [at] digiquillcom> wrote:
>>
>> > And I got rid of 607 warnings with a simple #define float double
>>
>> and by forcing float to be double you just make rendering slower.
>
>That's not true. By amazing coincidence, the FPU (at least for intel arch)
>is the same size as a Visual C++ double. So if your code is using floats,
>they have to be converted to doubles before stuffing in the FPU (and
>converted back to float on the way out of the FPU).
Not really. FLD with a 32-bit real operand is 20 clocks, as opposed to the
64-bit version at 25 clocks. FST is 44 vs. 45 clocks. FMUL is 27-35 clocks
for a float, or 32-57 for a double. FDIV is 89 or 94. So floats are faster,
under ideal conditions, but not by any significant amount. (This data is for
the 386. Other processors vary, of course. Intel no longer seems to publish
this data, for the obvious reason that pipelining and other optimizations
make it useless.)
--
These are my opinions. I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
|