Loic Grenie on Wed, 11 Apr 2007 19:08:45 +0200


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

Re: Timing a function


    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,
	gettime();
 	myfunction(i);
 	write("times.log", i, "  ", gettime());
);

  Hope this helps,

     Loïc