MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Timing[] holes?

  • To: mathgroup at
  • Subject: [mg23012] Re: Timing[] holes?
  • From: paulh at (P.J. Hinton)
  • Date: Tue, 11 Apr 2000 23:18:30 -0400 (EDT)
  • Organization: "Wolfram Research, Inc."
  • References: <8chbll$>
  • Sender: owner-wri-mathgroup at

In article <8chbll$9f5 at>,
 Gavin Scott <gscott at> writes:

> With 4.0.2 under Windows 2000, Timing[] doesn't seem to work, or at least
> not to the degree that I would expect.  For example,
>    Timing[N[Pi, 10^6]]
> returns something like 84 seconds, but the kernel eats up 40 minutes of
> CPU (and wall) time performing the evaluation!
> Should I complain to support?

Probably not.  Refer instead to the reference guide entry for Timing[].

| Timing includes only CPU time spent in the Mathematica kernel. It 
| does not include time spent in external processes connected via 
| MathLink or otherwise. Nor does it include time spent in the 
| Mathematica front end. 
| Timing[expr] includes only time spent in the evaluation of expr, and 
| not, for example, in the formatting or printing of the result. 
| result.

Your example is one of those cases where the bulk of the CPU time 
is spent outside evaluation because the textual form of the result
is so large.  Most of the time reported by Windows 2000 is 
reported in creation of box structures from the underlying expression, 
transmission of the box form from kernel to the front end by MathLink, 
and in the front end's computation of linebreaks for the result.

Try rerunning your example, this time suppressing the output.

start = SessionTime[];
Print[Timing[N[Pi, 10^6];]];
SessionTime[] - start

If you find that there is still a large discrepancy between Timing[]
and operating system timing reports, then a query to Technical Support
is highly encouraged.

P.J. Hinton
Mathematica Programming Group           paulh at
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: RE:graphics export to LAtek and Word
  • Next by Date: Re: Mod Bessel function bug ?
  • Previous by thread: Timing[] holes?
  • Next by thread: conversion 2.2.3 -> 4.01