Since the Debian distribution of SAGE uses Maxima with GCL list, I figured 
I'd run the benchmarks Mike posted on my installation.  The SAGE times are 
comparable to those in Mike's test, while the Maxima tests are faster:

sage: load /home/tabbott/fermat_gcd_1var.py
sage: time a = p1.gcd(p2, algorithm='ezgcd')
Wall time: 0.03 s (compare with 0.02)
sage:  mp1 = maxima(p1)
sage: mp2 = maxima(p2)
sage: time a = mp1.gcd(mp2)
Wall time: 0.07 s (compare with 0.20)

sage: load /home/tabbott/fermat_gcd_4var.py
sage: time a = p1.gcd(p2, algorithm='ezgcd')
Wall time: 0.12 s (compare with 0.13)
sage: mp1 = maxima(p1)
sage: mp2 = maxima(p2)
sage:  time a = mp1.gcd(mp2)
Wall time: 0.51 (compare with 1.04)

So, it looks like one's getting a 2-3x speedup by using Maxima with GCL 
lisp on this particular test.

Of course, the fact that I'm running with GCL lisp also means that my SAGE 
fails all the Maxima doctests involving real numbers due to roundoff 
differences.

        -Tim Abbott

On Tue, 1 Apr 2008, root wrote:

>
> William,
>
>> By the way, Richard Fateman pointed out to me offlist that
>> Maxima running on top of clisp _might_ be much
>> slower than Maxima on gcl.  This could be relevant to
>> our benchmarking.
>
> Not to start an implementation war but GCL compiles to C which
> compiles to machine code whereas clisp is interpreted. Both Axiom
> and Maxima have implementations on top of GCL. GCL includes a
> routine that will output the lisp type declarations and if these
> are loaded into the image with a recompile the resulting code is
> even faster. So if you use Maxima, use the GCL version.
>
> CMUCL/SBCL are capable of slightly tighter optimizations because
> they grew out of the SPICE Lisp project (under Scott Fahlman)
> and concentrated on code optimizations. Under CMUCL I managed to
> optimize a function down to a single machine instruction so it IS
> possible to get maximal optimizations. But GCL also lays down some
> very tight code since proper declarations can usually eliminate
> type dispatch, which is important in the inner loops.
>
> You can see the generated code by calling (disassemble ....)
>
> On the other hand you're likely to get small factors of improvements
> by changing to compiled lisps (but certainly much faster than python).
> My experience shows that its the algorithm changes that matter most.
>
>
>
>
> On a related note, I found it odd that someone commented that
> they wish to remove Lisp from Sage. Do you have any idea what
> might motivate that?
>
> Tim Daly
> Axiom
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to