Re: Computer Algebra Algorithms lisp vs. C.



Yes, for simple computations the time taken to marshal will be significant.
But I wouldn't have thought it would ever be prohibitively big as
marshalling (generating the string) shouldn't take any longer than
generating the data itself. For large computations, of course, marshalling
will be a smaller overhead.


Printing does not require too much time, but parsing does.

All the operations available to the user are implemented in C++ in my
code. There is no kernel/user language approach. That's why everything
is directly available to the C++ programmer.


I think that perhaps we've been talking at cross purposes. I thought you
were implementing a Turing powerful system (a programming language) rather
than a finite number of function calls. I had assumed that giac includes a
Maple-compatible interpreter.

Would giac not be more useful if it contained an interpreter?


There is an interpreter in giac, mainly for interactive user session, each function on the user side calls a C++ function of the library that a C++ programmer can call directly. That's why I said there is no kernel/user language approach, since CAS like maple or mupad have many built-in functions programmed in the user language (and kernel function access is not provided, at least in the standard distributions). From my experience, it is not much harder to implement CAS algorithms directly in C++ than in say maple, and I find debugging much easier. And the resulting function is sometimes significantly faster. .


Loading