Greg Zaverucha on Wed, 11 Apr 2007 21:25:13 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Timing a function

Thanks Loic, that's exactly what I need. I wasn't aware of Pari's gettime() function.


On Wed, 11 Apr 2007, Loic Grenie wrote:

   I'm sorry I don't know how pari/gp functions interact with perl. In either
 pari or gp you have a gettime() function which does nearly exactly what you
 wish: gettime() returns the time (in milliseconds) elapsed since last call
 to gettime(). Your example has only to be changed to:

for(i = 1, 1000,
	write("times.log", i, "  ", gettime());

 Hope this helps,