0
$\begingroup$

I am using Timing to measure the time it takes to load a ".dat" file and the reported time (4.47 seconds) is waaaay below the real time (measured using a stopwatch on my phone) which is about 44 seconds. I've never encountered such behaviour and I find it quite confusing. What could be the reason behind this and how to fix it?

$\endgroup$
  • 3
    $\begingroup$ What does AbsoluteTiming give? I think Timing measures kernel time only, so for example if you're trying to "display" the data in its entirety in Mathematica front end, that can take a long time to render but won't be included in Timing. Not sure that's what is happening here, but perhaps something like that. $\endgroup$ – ktm Jan 24 '18 at 14:03
  • $\begingroup$ Apparently the truth! I am going to use AbsoluteTiming from now on then, and the explanation is probably lying somewhere in what you're saying. Thanks for the tip. $\endgroup$ – Benjamin Márkus Jan 24 '18 at 14:05
  • 2
    $\begingroup$ "Timing includes only CPU time spent in the Wolfram Language kernel. It does not include time spent in external processes connected via WSTP or otherwise. Nor does it include time spent in the Wolfram System front end." $\endgroup$ – Bob Hanlon Jan 24 '18 at 14:06
  • 1
    $\begingroup$ It is mentioned in the "Details" section of the documentation on timing (@Bob's quote). $\endgroup$ – Michael E2 Jan 24 '18 at 14:13
  • $\begingroup$ Is that enough for an answer?: Difference between AbsoluteTiming and Timing $\endgroup$ – Kuba Jan 24 '18 at 20:29

Browse other questions tagged or ask your own question.