git-svn-id: svn://db.shs.com.ru/libs@583 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -7,6 +7,39 @@ int main(int argc, char *argv[]) {
|
|||||||
#if QT_VERSION >= 0x050000
|
#if QT_VERSION >= 0x050000
|
||||||
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||||
#endif
|
#endif
|
||||||
|
//################################
|
||||||
|
QHash<QString, QString> h2;
|
||||||
|
QMap<QString, QString> m2;
|
||||||
|
QString prefix = "1234567890";
|
||||||
|
PITimeMeasurer tm;
|
||||||
|
double el = 0.;
|
||||||
|
|
||||||
|
tm.reset();
|
||||||
|
for (int i=0; i<10000; ++i) {
|
||||||
|
h2[prefix + QString::number(i)+"1234567890"] = QString::number(randomi());
|
||||||
|
}
|
||||||
|
el = tm.elapsed_m(); piCout << el << h2.capacity();
|
||||||
|
|
||||||
|
tm.reset();
|
||||||
|
for (int i=0; i<10000; ++i) {
|
||||||
|
m2[prefix + QString::number(i)+"1234567890"] = QString::number(randomi());
|
||||||
|
}
|
||||||
|
el = tm.elapsed_m(); piCout << el;
|
||||||
|
piCout << "*********";
|
||||||
|
|
||||||
|
QString _s;
|
||||||
|
tm.reset();
|
||||||
|
for (int i=0; i<10000; ++i) {
|
||||||
|
_s = h2.value(prefix + QString::number(i)+"1234567890");
|
||||||
|
}
|
||||||
|
el = tm.elapsed_m(); piCout << el << h2.capacity();
|
||||||
|
|
||||||
|
tm.reset();
|
||||||
|
for (int i=0; i<10000; ++i) {
|
||||||
|
_s = m2.value(prefix + QString::number(i)+"1234567890");
|
||||||
|
}
|
||||||
|
el = tm.elapsed_m(); piCout << el;
|
||||||
|
//################################
|
||||||
CDPultWindow w;
|
CDPultWindow w;
|
||||||
w.show();
|
w.show();
|
||||||
if (a.arguments().size() > 1)
|
if (a.arguments().size() > 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user