octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #52809] interpreter performance is slow on dev


From: Rik
Subject: [Octave-bug-tracker] [bug #52809] interpreter performance is slow on development branch
Date: Wed, 10 Jan 2018 11:44:21 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #22, bug #52809 (project octave):

Yes, move this to a new bug report.

For reference, I used these two loops while testing performance

bm_for_loop.m


a = 1; b = 1; t0=cputime; for i=1:1000; for j=1:1000; a = a + b + 123.0; end;
end; t1=cputime; t1 - t0


bm_for_loop2.m


a = 1; b = 1; t0=tic; for i=1:1000; for j=1:1000; a = a + b + 123.0; end; end;
t1=toc(t0); t1


The first one uses cputime, the second uses wall time.

Results:


octave:1> bm_for_loop
ans =  4.6840
octave:2> bm_for_loop
ans =  4.6640
octave:3> bm_for_loop
ans =  4.6240
octave:4> bm_for_loop2
t1 =  4.4830
octave:5> bm_for_loop2
t1 =  4.5830
octave:6> bm_for_loop2
t1 =  4.4962


As you can see, wall time was less than cputime which doesn't make sense to
me, but maybe that is my misunderstanding.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52809>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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