[Maxima] Questions for using Lisp language to built the computer algebra systems.
bruno.daniel at gmx.net
Tue Sep 18 06:12:26 CDT 2007
take a look at SBCL or CMUCL. These are quite efficient implementations of the
Common Lisp standard, see http://norvig.com/python-lisp.html , for
example. They are much faster than Python or Java and can reach speed similar
to C++ or Fortran 90 if you know how to code the hot spots of your program in
Lisp efficiently. Some constructions of the language are even faster than the
corresponding C++ construction, e.g. exception handling.
The Common Lisp standard offers many datatypes besides just lists. You can use
arrays, structs, classes etc. as in any other language, see
"Lisp is, of course, famous for its list data structure, and most Lisp books,
following the ontogeny-recapitulates-phylogeny principle of language
instruction, start their discussion of Lisp's collections with lists. However,
that approach often leads readers to the mistaken conclusion that lists are
Lisp's only collection type. To make matters worse, because Lisp's lists are
such a flexible data structure, it is possible to use them for many of the
things arrays and hash tables are used for in other languages. But it's a
mistake to focus too much on lists; while they're a crucial data structure for
representing Lisp code as Lisp data, in many situations other data structures
are more appropriate.
To keep lists from stealing the show, in this chapter I'll focus on Common
Lisp's other collection types: vectors and hash tables.1 However, vectors and
lists share enough characteristics that Common Lisp treats them both as
subtypes of a more general abstraction, the sequence. Thus, you can use many
of the functions I'll discuss in this chapter with both vectors and lists."
A big advantage of Lisp is that you can easily compile new functions to
machine code at runtime. This turns out to be quite important for some
applications of computer algebra systems, see my posting on this mailing list a
few weeks ago:
Other computer algebra systems usually have to resort to some byte code for the
user-defined functions. Lisp can compile them to machine code.
More information about the Maxima