How to determine how fast a script is running? (Profiling)

Hi,

I have two variations of the script, which does the same job, but in a different way.
I want to check which one actually runs faster.

Is there any way of measuring time using max script?
Even if it's not accurate, it's okay.
I just need a vague sense of which script is running faster.

Thanks.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
martinskinner's picture

You could simply add a

You could simply add a message box to appear at the end once the script is finished what is was doing.

Apply this to both scripts.

Run each, and as you run them in turn, count in elephants..
"One elephant", "Two elephant"..etc

The one who's message box pops up first is the winner!!

(use a stopwatch if you'd rather not count elephants)

masquerade's picture

Hi,I think Dave Stewart's

Hi,

I think Dave Stewart's time stamp structure is perfect for your case and definitely more accurate than counting elephants :)  (no offense Martin) 

You can get the code from this link, there are also examples about how to use the structure.

http://www.keyframesandcode.com/code/category/development/maxscript/for-scripters/ 

knox_12345's picture

WOW! works like a

WOW! works like a charm.
Thanks a lot.

Really helpful.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.