computation time information



Am 18 Dec 2006 um 18:29 hat Eric Reyssat geschrieben:

> Hello,
> 
> I would like to compare the time complexities of some functions that I 
> defined with Maxima. Is there a better way to collect the times than
> 
> showtime:true;
> f(1);
> f(2);
> f(4);
> ...
> f(2^30);
> 
> and then copy-paste-clean "by hand" Maxima's results ?
> Is the output given by showtime, or any other time information, 
> available in some variables ?
> 
> Eric Reyssat

Hi Eric 

(%i23) factor(2^128-1);
(%o23) 	      3 5 17 257 641 65537 274177 6700417 67280421310721
(%i24) factor(2^192-1);
	2
(%o24) 3  5 7 13 17 97 193 241 257 641 673 65537 6700417 22253377
							   18446744069414584321
(%i25) factor(2^256-1);
(%o25) 3 5 17 257 641 65537 274177 6700417 67280421310721 59649589127497217
							 5704689200685129054721
(%i26) time( %o23, %o24, %o25 );
(%o26) 			      [0.04, 0.11, 11.33]

HTH 
Volker van Nek