[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cputime() returns incorrect values
From: |
Anton Dereventsov |
Subject: |
cputime() returns incorrect values |
Date: |
Sat, 1 Sep 2018 21:03:43 -0500 (CDT) |
The following simple script generates and multiplies two random 1000-by-1000
matrices for 20 iterations and measures how long (in terms of both the
wall-clock time and the cpu time) each iteration was executing.
Here is the code:
And here is the output that I get:
The wall-clock time measured by tic-toc is believable but the cpu time is
clearly false: sometimes it is negative and sometimes it is exactly 0 or 1.
These particular results were obtained in Octave 4.2.2 on Windows 7 machine
with Intel i7-3610QM cpu but I observed the similar output on Ubuntu 16.04
with Intel Xeon E3-1535M v6.
Coincidentally, in Matlab the same code on the same machines returns
reasonable cpu time.
Is this a bug or am I doing something terribly wrong?
Thanks,
Anton
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
- cputime() returns incorrect values,
Anton Dereventsov <=