CPU-hungry limit



On 05/15/2013 11:50 AM, James Cloos wrote:
> It took about 20 minutes of CPU time using sbcl.
>
> (A url to the pdf was posted some time ago in, I think, math-fun.)
>
> (%i1) f : (sin(tan(x))-tan(sin(x)))/(asin(atan(x))-atan(asin(x)));
> (%i2) limit(f,x,0);

Hi,
that serves as a performance benchmark. In my laptop (Intel P7550  @ 
2.26GHz),

(%i3) tlimit(f,x,0);
Evaluation took 0.0480 seconds (0.8610 elapsed) using 2.968 MB.
(%o3)                           1
(%i4) limit(f,x,0);
Evaluation took 1330.2430 seconds (1334.6460 elapsed) using 331262.978 MB.
(%o4)                           1

and in my fastest PC (Intel i7-3930K @ 3.20GHz),

(%i3) tlimit(f,x,0);
Evaluation took 0.0300 seconds (0.1030 elapsed) using 2.968 MB.
(%o3)                                  1
(%i4) limit(f,x,0);
Evaluation took 842.0100 seconds (844.8920 elapsed) using 331265.852 MB.
(%o4)                                  1

Too bad only one of the 12 cores in that PC are being used by Maxima, 
but even though it is about 40% faster than my laptop.

Regards,
Jaime