Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Timing in Mathematica

  • To: mathgroup at
  • Subject: [mg74758] Re: Timing in Mathematica
  • From: David Bailey <dave at>
  • Date: Wed, 4 Apr 2007 04:02:51 -0400 (EDT)
  • References: <euqnqt$8br$>

amitsoni.1984 at wrote:
> Hi,
> I am using Timing[.......] to calculate the time taken by an
> expression in Mathematica. But it is not showing values below 0.01
> seconds. For values below 0.01s it just shows 0. Second
> Is it possible to get the value of time lower than 0.01s by somehow
> lowering the least count. I am using Mathematica 5.2 on Windows. I was
> getting lower values of time on Mathematica(5.2) on a Linux computer.
> Thank you,
> Amit
It never makes sense to time a computer task that takes such a short 
time because there are all sorts of one-off delays - such as paging 
information into memory - that can distort the result. If you want to 
time f[] (say) I would time:


and maybe place a loop round this as well to ensure you obtain a total 
time of at least 10 seconds, dividing the result by the total number of 
calls to f[].

Bear in mind that the CompoundExpression (;) will take some time, and 
that Mathematica can cache results in some situations.

David Bailey

  • Prev by Date: Re: (Not trivial) Definite Integration of a rational function
  • Next by Date: Re: Re: verification
  • Previous by thread: Re: Timing in Mathematica
  • Next by thread: Re: Timing in Mathematica