MathGroup Archive 2011

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

Search the Archive

Re: Timing function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123043] Re: Timing function
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Mon, 21 Nov 2011 04:29:06 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <ja84v7$ifg$1@smc.vnet.net>

On 19/11/2011 11:46, Mark wrote:
> Hello community:
>
> When I run the following expression below, It returns the value of zero for the timing. If I press "shift enter" again, it then correctly returns the amount of time for the expression to run / plot.
>
> Also, I noticed that if I change the variable from x^3 to x^2 and press "shift enter" at that point, zero again is returned for the timing result. I am using Mathematica 8.01
>
> Timing[Plot[x^3, {x, -5, 5}]]
>
> Does anyone know the reason for this?
>

The clock granularity has already been mentioned, but I suspect perhaps 
that if you are timing Plot commands, you are struggling with more 
complex plots that are irritatingly slow! A complication is that Timing 
only measures the time used by the kernel, and for some plots, most of 
the time is consumed in the frontend. Even AbsoluteTime does not solve 
this problem easily, because it returns its result before the FE starts 
its work.

I gave a talk at the 2010 autumn conference in Champaign discussing a 
variety of subtle timing issues including this problem. You will find a 
link to this presentation here:

http://www.wolfram.com/events/techconf2010/speakers.html

David Bailey
http://www.dbaileyconsultancy.co.uk




  • Prev by Date: Re: Timing graphics in the real world
  • Next by Date: Re: Matrices as operators
  • Previous by thread: Re: Timing function
  • Next by thread: Re: Timing function