Page 1 of 1

computing time

Posted: Wed Feb 09, 2011 2:03 am
by KarinL
Hey, I'm using EViews 7.
Is there any command that returns computing time needed, i.e. to solve a MLE using a logl object?
I've got the feeling that my program is very slow and I'd like to compare different versions of my program regarding computing time.
Thanks.

computing time

Posted: Wed Feb 09, 2011 8:05 am
by EViews Gareth
Look up "tic" and "toc"

Re: computing time

Posted: Wed Feb 09, 2011 10:04 am
by KarinL
perfect! thanks

Re: computing time

Posted: Wed Feb 09, 2011 10:07 am
by EViews Gareth
I gave the previous response via my phone - hence its short nature.

I find the best way to use tic and toc is to save the toc into a scalar variable rather than just use it to send stuff to the statusline. It can be tricky to organise your program so that toc displays on the statusline, especially if you're using subroutines. If you save it into a scalar, you can then open that scalar up and view it whenever you want.

Thus:

Code: Select all

tic 'some code here scalar time = @toc
I find is better than simply:

Code: Select all

tic 'some code here toc