Re: Computer Algebra Algorithms lisp vs. C.



bernard parisse wrote:
> > A premature optimisation.
>
> I don't understand why you speak of optimisation, if you have
> for some reason to manipulate multivariate polynomials,
> there is no way to avoid large data. Parsing and printing
> them each time you call a CAS function with a string interface
> would therefore cost (too) much time.

You are advocating that marshalling be optimised away. I am saying that this
is a premature optimisation because you haven't gathered data on the time
taken to marshal compared to the time taken to do any symbolic
computations.

> > There are no open-source ones though, AFAIK.
>
> Can you give a link to a non open-source CAS written
> with Ocaml which has comparable capabilities to
> the CAS I cited above? I'm not interested just in a
> parser, I mean something that can compute integrals,
> limits, can factor polynomials, reduce matrices etc.
> If so, how does it compare?

I'll time it properly when I find the time. My guess would be that the
performance of operations which are equivalently implemented in C++ in your
code will be less than a factor of 2 slower in my code and the performance
of operations not implemented in C++ in your code will be 2-3 orders of
magnitude faster in my implementation. So, there will be a finite number of
operations which are faster in your code and an infinite number that will
be faster in my code. Furthermore, partial specialisation via run-time code
generation then gives another order of magnitude in performance.

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com
.