POV-Ray : Newsgroups : povray.advanced-users : Isosurface speed : Re: Isosurface speed Server Time
28 Jul 2024 18:12:23 EDT (-0400)
  Re: Isosurface speed  
From: Thorsten Froehlich
Date: 22 Jul 2004 17:33:30
Message: <410032aa@news.povray.org>
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

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