help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: measuring script speed


From: marco atzeri
Subject: Re: measuring script speed
Date: Sun, 18 Dec 2011 18:05:43 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 12/18/2011 5:49 PM, BVBA NuKey Music wrote:
I thought I could measure the execution time of a script like this:
begintime=cputime;myscript;cputime-begintime

this does not work however with scripts which start with a clear
command because the begintime-variable gets erased. Therefore I
thought in stead of deleting the clear statement for the test, I could
proceed as follows:
global begintime=cputime;myscript;cputime-begintime

unfortunately this doesn't work, I also tried this on the linux command line:
time octave<myscript.m

this works but I see the octave-environment being opened which could
falsify the timing results

so what's the best way to achieve this?

thanks in advance
nukey

tic()
myscript;
toc()

Regards
Marco


reply via email to

[Prev in Thread] Current Thread [Next in Thread]