|
|
In article <410023df$1@news.povray.org> , Andrew C on Mozilla
<voi### [at] devnull> wrote:
> Which is faster (in an isosurface)?
>
> pow(x, 2) or x*x?
>
> (Ditto for x^3.)
The speed will be identical for all of these. Further, note that all
constant integer powers up to eight will be optimised such to take as few
multiplications as possible, i.e. a power of four only takes two
multiplications instead of four, and a power of eight only takes three
multiplications.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
|
|
>>Which is faster (in an isosurface)?
>>
>>pow(x, 2) or x*x?
>>
>>(Ditto for x^3.)
>
>
> The speed will be identical for all of these. Further, note that all
> constant integer powers up to eight will be optimised such to take as few
> multiplications as possible, i.e. a power of four only takes two
> multiplications instead of four, and a power of eight only takes three
> multiplications.
Excellent.
POV-Ray Rocks!(tm)
Post a reply to this message
|
|