Ref T280, sample to test if QHash or QMap for key callsign is faster

* QHash seems to be faster and is const
* see also https://woboq.com/blog/qmap_qhash_benchmark.html
This commit is contained in:
Klaus Basan
2018-06-12 00:42:10 +02:00
parent 25a2a8d350
commit 398ca4fb45
3 changed files with 172 additions and 4 deletions

View File

@@ -45,7 +45,8 @@ int main(int argc, char *argv[])
qtout << endl;
qtout << "1 .. JSON" << endl;
qtout << "2 .. Change object" << endl;
qtout << "3 .. Containers" << endl;
qtout << "3a .. Containers" << endl;
qtout << "3b .. Callsign QMap vs QHash" << endl;
qtout << "4 .. Metadata" << endl;
qtout << "6a .. Performance create / copy / ..." << endl;
qtout << "6b .. 40/20 Interpolator scenario" << endl;
@@ -61,7 +62,8 @@ int main(int argc, char *argv[])
if (s.startsWith("1")) { CSamplesJson::samples(); }
else if (s.startsWith("2")) { CSamplesChangeObject::samples(); }
else if (s.startsWith("3")) { CSamplesContainer::samples(); }
else if (s.startsWith("3a")) { CSamplesContainer::samples(); }
else if (s.startsWith("3b")) { CSamplesPerformance::sampleQMapVsQHashByCallsign(qtout); }
else if (s.startsWith("4")) { CSamplesMetadata::samples(); }
else if (s.startsWith("6a")) { CSamplesPerformance::samplesMisc(qtout); }
else if (s.startsWith("6b")) { CSamplesPerformance::interpolatorScenario(qtout, 40, 20); }