bug-libmatheval
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-libmatheval] derivatives vs new functions


From: Giulio Bottazzi
Subject: Re: [Bug-libmatheval] derivatives vs new functions
Date: Sun, 9 Oct 2005 01:45:10 +0200

Hello,
I want to share with you the result of a recent test I did. I was
curious how much slow is libmatheval compared to some other
"more optimized" software. I found a similar project, named "Formulc".
You can find it here 

http://www.cs.brandeis.edu/~hhelf/formu/formulc.html

it does not implement the symbolic derivative neither the automatic
recognition of variables, both featured in libmatheval. I'm not an
expert of this kind of coding, but based on a previous posting by Alex
(it's reported below) I expected quite poor libmatheval performances.
Well, I discovered that it is not the case! Consider this function

f = exp(x^2+2*x+1.) + sin(3*tan(x))^(3.2) + 0.1

the computation of f on 1,000,0000 random numbers in [0,1] gave this
results on my machine at home

direct:   1.450000 sec
formulc:  2.290000 sec
matheval: 2.420000 sec

where "direct" means the use of a coded C function. As you can see, the
speed of libmatheval is quite comparable to the speed of formulc. I
tried various functions, always obtaining similar results. In
conclusions, the features implemented in libmatheval do not seem to lead
to an excessive slow-down in the generated code. Given its
extra-features, I would consider it the clear winner.

Any comment?

        G.


On Fri, 25 Mar 2005 22:49:05 +0100
"Aleksandar B. Samardzic" <address@hidden> wrote:

> in C-like expressions.  Thus, symbolic part of the library is becoming
> baggage, because some of these proposed features have no symbolic
> counterparts at all and on the other side calculating expressions could
> be implemented more efficiently without syntax tree, that is in turn
> necessary for symbolic calculations (so adding kind of "not-implemented"

Attachment: pgp7KHKZsFVrj.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]