POV-Ray : Newsgroups : povray.beta-test : Function (optimization?) bug : Re: Function (optimization?) bug Server Time
30 Jul 2024 06:24:56 EDT (-0400)
  Re: Function (optimization?) bug  
From:
Date: 7 Jan 2002 05:48:14
Message: <stti3u8slu0c764ru6qq73vfmcqua3sslp@4ax.com>
On Fri, 28 Dec 2001 18:24:50 +0100, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> It won't be included in any final release (there is a compile-time switch to
> turn it off).  The reason is that one can "write" programs that reliably
> crash and won't run in future version either because the function VM *will*
> change.  The output is a more human-readable output of the function VM
> instructions to help debugging the function compiler and optimizer.

I wonder if there could be addition to documentation with some general rules of
optimizations made by function's parser. For example - is it enough when I write
just:

#macro P(F,G)
function{ x + F*y + z^G }
#end

or should I write:

#macro P(F,G)
function{ 
  x
  #if (F!=0) + #if (F=1) y #else F*y #end #end
  + #if (G=0) 1#else #if( G=1) z #else z^G #end #end
}
#end

At this beta time I have unofficial debug stream to check. But what later ?
Considering time of rendering and designing some general systems for isosurfaces
it is important to make as big optimisetion as possible. Not everybody know C to
verify function equation with source of optimizer.

Also I wonder if there could be inline type of function (code of function is
inlined at parsing time instead of calling at render time). So functions could
be unrolled first, and then optimizations applied.

Sorry, I know it is a feature request but I found this thread and this group
best place to add this, when you feel some other group better, send answer there

ABX


Post a reply to this message

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