POV-Ray : Newsgroups : povray.off-topic : Processor speed : Re: Processor speed Server Time
6 Sep 2024 19:20:25 EDT (-0400)
  Re: Processor speed  
From: Warp
Date: 28 Oct 2008 13:25:04
Message: <49074aef@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> Is integer addition faster or slower than floating-point addition?

  Impossible to say. It depends on the processor type, the integrity of
the pipelines, the combination of instructions, and tons of other things.

  It also depends on what you are doing. If you are loading the values of
two variables into the FPU, calculating the addition, and then storing the
result into a variable, then that's definitely slower than integer addition
because the loads and stores consume a lot more clock cycles for the FPU.

  If you are measuring purely the clock cycles taken by one single addition,
disregarding everything else, then they are probably equally fast (although
with modern Intel/AMD processors I cannot even say that for sure, as they
have microcodes which take fractions of a clock cycle and weirdness like
that).

> How about multiplication?

  It depends on the processor. Some processors have 1-clock-cycle FPU
multiplication, while others don't. Some have special circuitry for
calculating CPU register multiplication in 1 clock cycle, others have
a small fraction of that circuitry which calculates it in 2 or a few
clock cycles, and yet others calculate it with the FPU (which curiously
makes integer multiplication slower than floating point multiplication).

> How do trigonometric functions compare?

  What do you think?

> Is single precision any faster than double precision?

  Only if we measure with the pipeline and cache capacity requirements.

> Are 8-bit integers faster than 16-bit integers?

  It depends on the processor.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.