|  |  | On 5/16/21 12:10 PM, Tor Olav Kristensen wrote:
> 
> I have now created a new Github repository with POV-Ray macros that I think is
> useful.
> 
> https://github.com/t-o-k/Useful-POV-Ray-macros
> 
...
Cool! Very clean work as always. On my list to play with these macros 
along with your suggested stats updates.
---
A comment on local variables.
Where you have multiple references to a local variable, the symbol 
definition and look up is likely clearer and faster.
Where you have a local variable with only one reference, however, the 
symbol definition and look up is all overhead. There isn't any 
optimization which removes / streamlines the operations within macros.
There's a clarity vs performance trade-off in the single reference to 
local variable case.
Bill P.
--- Ref.
A millsion calls.
AngleBeteenVectors without Dot
-----------------------------
9.66user 5.30system 0:15.48elapsed
9.54user 5.44system 0:15.51elapsed
9.52user 5.49system 0:15.54elapsed
9.76user 5.14system 0:15.44elapsed
   "9.66 9.54 9.52"
AngleBeteenVectors with Dot local var
-------------------------------------
10.19user 5.58system 0:16.29elapsed
10.36user 5.39system 0:16.27elapsed
10.21user 5.48system 0:16.22elapsed
10.44user 5.48system 0:16.44elapsed
   "10.19 10.36 10.21"                 28.72 -> 30.76 ---> +7.10%
 Post a reply to this message
 |  |