15.04.2014 - Version 0.3.8_beta, last version of 0.3.8 branch. Too much added and fixed...
This commit is contained in:
60
main.cpp
60
main.cpp
@@ -44,36 +44,34 @@ class ElementD: public PIObject {
|
||||
};
|
||||
*/
|
||||
#include "pip.h"
|
||||
#include <QVector>
|
||||
#include "pivariant.h"
|
||||
|
||||
/*
|
||||
Test::PIVariant<> * pv;
|
||||
|
||||
|
||||
template <typename T>
|
||||
Test::PIVariant<T> newVariant(const T & v) {return Test::PIVariant<T>(v);}
|
||||
template <typename T>
|
||||
Test::PIVariant<T> * castVariant(Test::__PIVariantBase * v, const T & t) {return static_cast<Test::PIVariant<T> * >(v);}
|
||||
*/
|
||||
#include "picode.h"
|
||||
|
||||
#define S(a, b) a#b
|
||||
|
||||
int main (int argc, char * argv[]) {
|
||||
PITimer tm;
|
||||
std::vector<int> sv;
|
||||
PIVector<int> pv;
|
||||
QVector<int> qv;
|
||||
pv.reserve(256);
|
||||
for (int s = 1; s <= 20; ++s) {
|
||||
int cnt = s * 1000000;
|
||||
piCout << "********";
|
||||
piCout << cnt << "insertion:";
|
||||
sv.clear();
|
||||
pv.clear();
|
||||
qv.clear();
|
||||
tm.reset();
|
||||
for (int i = 0; i < cnt; ++i) {
|
||||
sv.push_back(i);
|
||||
}
|
||||
piCout << "stl:" << tm.elapsed_m();
|
||||
tm.reset();
|
||||
for (int i = 0; i < cnt; ++i) {
|
||||
pv.push_back(i);
|
||||
}
|
||||
piCout << "pip:" << tm.elapsed_m();
|
||||
tm.reset();
|
||||
for (int i = 0; i < cnt; ++i) {
|
||||
qv.append(i);
|
||||
}
|
||||
piCout << " qt:" << tm.elapsed_m();
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
//piCout << (S(1,2));
|
||||
//(1,2));
|
||||
//CodeParser cd;
|
||||
//cd.parseFile("test.cpp");
|
||||
//piCout << v.toType<float>();
|
||||
//piCout << v.toType<float>().toType<PIString>();
|
||||
//PIFile::remove("ki");
|
||||
/*PIConfig conf("protocols_commod.conf");
|
||||
piCout << conf.allTree();
|
||||
conf.setValue("rmd.123", 456);*/
|
||||
piCout << PIString("1.1").toFloat();
|
||||
piCout << PIString("1,1").toFloat();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user