[Kst] New equation parser and interpreter
George Staikos
staikos at kde.org
Thu Feb 12 18:44:11 CET 2004
I rewrote the equation parser and interpreter today and I think the
preliminary results speak for themself:
kst: Trying my parser on [2*sin(x)*cos(x) + 0.95e-1-10*log(2)].
kst: Parsing time: 0
kst: Execution time: 890000 <--------- new interpreter
kst: FillY <<<<<<<
kst: Execution time: 6840000 <--------- old interpreter
kst: FillY >>>>>>>
That's about 13% of the previous time required to interpret an equation
across one million data points - it's over 7 times faster! Those units are
in clock_t. I expect this number to change as I finish implementing it
because this was not calling sin(), cos(), or log() - that's not implemented
yet. Those just return 0. However I think this is very promising. Actually
it's possible to make it faster than my implementation too, but I'm not sure
it's worth the extra effort.
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
More information about the Kst
mailing list