POV-Ray : Newsgroups : povray.binaries.images : yet another iso : Re: yet another iso Server Time
5 Nov 2024 03:15:21 EST (-0500)
  Re: yet another iso  
From: clipka
Date: 19 Oct 2009 01:31:10
Message: <4adbf99e$1@news.povray.org>
Alain schrieb:

> I remenber a tread where it was said that "pow(x,2)" is faster than 
> "x*x". It may only be due to the fact that the variable is evaluated 
> only once, but it seems to be faster.

That may well be indeed. I never thought about it, but it seems 
plausible, as each reference to a variable requires a hashtable lookup, 
as well as checking whether the value is indeed a scalar value. With 
SSE2, a pow() computation may be able to beat that overhead.


Post a reply to this message

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