git-svn-id: svn://db.shs.com.ru/pip@649 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2018-10-17 12:55:40 +00:00
parent 74a0743045
commit b8db3b5010
5 changed files with 19 additions and 11 deletions

View File

@@ -42,6 +42,8 @@ public:
};
int main() {
PIEvaluator eval, eval2;
//eval.check("1-1+1");
//piCout << eval.evaluate().real();
eval.setVariable("t", complexd(1, 2));
eval.check("(t*t*(t<8))+(72*(t>8)-8*(9-t)*(9-t)*(t>8)*(t<8.8))+(3*(t-8.8)*(t>8.8))");
PIByteArray ba = eval.save();
@@ -59,12 +61,14 @@ int main() {
tm.reset();
PIEvaluator e2;
piForTimes(100) {
e2.load(ba);
e2.load(ba);
piForTimes(10000) {
e2.setVariable("t", complexd(1, 2));
complexd ret = e2.evaluate();
}
us = tm.elapsed_u(); piCout << " save" << us / 100.;
us = tm.elapsed_u(); piCout << " save" << us / 10000.;
/*A a;
CONNECTU(PICout::Notifier::object(), finished, &a, pcf);