Revision 1c9d680...
Go back to digest for 7th April 2013Optimization in Educational
Aleix Pol Gonzalez committed changes in [analitza] /:
Optimize calculation of expressions
Right now, we were copying the elements whenever we found a scalar in an
expression. Now we know if it's a value and (only) in those cases we use
the same value. (Cn::copy calls were reduced to 1/3)
This optimization happens because it was detected as one of the problems
when calculating some expression Percy needs for his new 3D plotting
system.
After this change, the execution time of his unit test is about 20% faster.
File Changes
Modified 5 files
- analitza/analyzer.cpp
- analitza/operations.cpp
- analitza/polynomial.cpp
- analitza/vector.cpp
- analitza/vector.h
5 files changed in total