|
![](/i/fill.gif) |
In article <3a07db72@news.povray.org>, "Wlodzimierz ABX Skiba"
<abx### [at] abx art pl> wrote:
> I have checked that simple R function is called
> nearly 400 times by subfunctions for the same coordinates,
> subfunctions are also called many times
> and I want ask if there is optimized calling with the same arguments ?
> function at call should checks last called arguments
> and compare with new one
> if are equal than return remebered result instead of calculated
This type of optimization has been discussed a while ago, I think the
discussion started in povray.general and spread to .programming...
Unfortunately, nobody has ever done anything about it. There don't seem
to be any people who understand the isosurface code well enough and have
the time to implement this. Or maybe, like me, they are simply waiting
for 3.5 to come out so they don't have to forget a lot of what they
learned and have a cleaner, more stable set of code to work with.
> to avoid slower render time for simple isosurface
> this feature should be switched inside isosurface
> (i.e. keyword "fast_results")
This could be done at parse time so it wouldn't slow down even the
simplest functions, so this option would be unnecessary.
Another possibly useful feature would be the ability to use variables in
the function, for example:
function {
A = sqr(x+y*Func(x,y,z));
Func2(A, A+2, x+A/2)
}
And of course, functions allowing different numbers of parameters...
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |