Function parser for C++: Speed tests

In order to get an idea about the speed of the library, I made a small program which measures its parsing and evaluating speed. It does this by parsing the given function in a loop many times (for several seconds), measuring the total time spent, and then dividing this total time by the number of loops. The same is done for evaluating speed (both with default and optimized bytecodes). The speed of the Optimize() function was also measured.

The test was run on a 3.4GHz Pentium4 using gcc 3.3.5 with the compiler options -O3 -ffast-math -march=pentium4


Function: "((3*x^4-7*x^3+2*x^2-4*x+10) - (4*y^3+2*y^2-10*y+2))*10"


Function: "((3*(x+(5*(y+2)-7*x)*3-y)+4*5+3)-7 + (8*x+5*y+(7-x))*4)-10*3+4"


Function: "sin(sqrt(10-x*x+y*y)) + cos(sqrt(5-x*x-y*y)) + sin(x*x+y*y)"


Function: "exp((-x*x-y*y)/100)*sin(sqrt(x*x+y*y))/(10*2) + sin(x^4-4*x^3+3*x^2-2*x+2*5-3) - cos(-2*y^4+5*y^3-14*x^2+8*x-120/2+4)"