POV-Ray : Newsgroups : povray.general : Github repository with useful macros : Re: Github repository with useful macros Server Time
20 Apr 2024 07:14:45 EDT (-0400)
  Re: Github repository with useful macros  
From: William F Pokorny
Date: 17 May 2021 08:28:00
Message: <60a26150$1@news.povray.org>
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

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