I have to define the algorithm to calculate angles. Considering that I have to do it lots of times each frame, I’m looking for the fastest way I can find.
I’ve found in here: derivative.ca/Forum/viewtopic.ph … ion#p14462 a comment that says that OPs can be faster than scripts.
I am an old style soft writer, so I prefer to write scripts rather that OPs (I’m new to all this), but I translate the algorithm to CHOPs to see the difference and I found some problems:
I put each method on a different container, so I can calculate each containers cook time, but I can’t find the way to put it on screen. The only way to see cook time was Middle Mouse Button on Container, but even there I found strange reactions.
First of all all test found that script is faster than CHOPs. (although I have to say that acos function surprised me… It’s really fast… maybe you just use a table? )
Each time I reload .TOE cook times change and remain the same since I close and reopen Touch, so I can’t found the way to monitor each frames cooking time… (seems that Touch calculates cook time only first time and then repeats that number)
Then in the OPs version I try to do another version with Pythagoras using Math OP “length” to see if I can found a faster way to find hypotenuse, but I don’ understand how to use it.
How can I put “real” cook time of each component on screen? I want to see haw much it changes each time…
You can get all these info in a CHOP directly by using the Info CHOP.
Note however: cook time for an operator is only that operator, it does not include the time of all its children, though we are testing a solution for that in the experimental builds.
We don’t use a table for acos, we just use the built in standard c math library for our trig functions.
I had a poke around with vesabios’s script from this thread
[url]saving gpu ram! - #3 by Leskos]
and made a component that gives you the total cook time, and a table of cook times for all operators inside a component. Still a little rough around the edges, but can be adapted. performance_analyser.tox (1.96 KB)
Yeah, that is a whole bunch simpler and more elegant isn’t it! Haven’t used the perform DAT before, was each op’s cook time always logged? (recently downloaded experimental build 16260) Ah well, was kinda satisfying to do it the long way round…