Subject: Re: hmm...
To: None <port-sparc@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: port-sparc
Date: 07/30/1995 20:29:17
> I remember reading sometime back about people doing
> time 'echo 2^8192 | bc' and it took horribly long amounts of time on
> machines which were fairly fast.  Get a program called calc, availabe
> from David I Bell (dbell@pdact.pd.necisa.oz.au and
> chongo@toad.com)... Under Sunos 4.1.3_U1 on a 4/110, it takes about
> 40 seconds to do 2^8192 under bc and only 2 seconds to do the same
> thing under calc.

In which case, this is not a problem with the machine or the port, but
rather with bc?  bc is probably doing 2*2*2*2*...*2*2*2, with calc
doing, most likely, ((...(((2^2)^2)^2)...)^2)^2.  (I can't see why bc
wouldn't be doing it this way - any power can be optimized thusly, with
only three full-size temporaries needed versus two for the other
method), but it seems like the likeliest explanation.

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu