Sebastian H. wrote:
> [...]
>
> Astonishing is that version 5 is faster than version 8
> although the latter one contains a simpler square root function.
> Probably some compiler optimization (g++ (GCC) 3.3.5 (Debian
> 1:3.3.5-13)) jumped in in version 5.
But those differences are marginal - and it is very likely that
interferences between code, compiler optimizations and processor design
play a role here. So there is no reason to select a certain code
variant based on this.
But anyway this is a good demonstration that these days simple
estimations of efficiency of code based on counting elementary
operations is not working.
Christoph
--
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 14 Mar. 2006)
MegaPOV with mechanics simulation: http://megapov.inetart.net/
Post a reply to this message
|