POV-Ray : Newsgroups : povray.advanced-users : function optimization question : Re: function optimization question Server Time
29 Jul 2024 12:19:33 EDT (-0400)
  Re: function optimization question  
From: Thorsten Froehlich
Date: 15 Mar 2002 06:31:30
Message: <3c91db92$1@news.povray.org>
> Note expression "x*Ey+y*Ex-R1*Ex" appear twice. How many times is it
> calculated ?

Twice. The function compiler cannot optimise common subexpressions and it is
unlikely this feature will be added to it in time for a 3.5 release because
it is very complex and would require another intermediate code
representation layer.  The (current) function compiler has no layer suitable
for general optimisations because it performs similfications and elimination
of constants in the expression tree.  That tree is then turned into function
VM instructions, which is nearly trivial because no complex language
constructs (which would benefit from such further optimisation as well) are
supported by the compiler.

    Thorsten


Post a reply to this message

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