Go to the source code of this file.
◆ calcMean()
double calcMean |
( |
std::vector< double > & |
times | ) |
|
◆ main()
Definition at line 66 of file testMETHash.cxx.
66 {std::cout << __PRETTY_FUNCTION__ << std::endl;
68 std::pair<xAOD::MissingETContainer, xAOD::MissingETAuxContainer> cont;
69 cont.first.setStore(& cont.second);
71 std::vector<double> stringComparisonTimes;
72 std::vector<double> hashComparisonTimes;
74 for(
size_t i = 0;
i < 1000; ++
i){
75 for(
size_t j = 0; j < 7; ++j){
77 cont.first.push_back(
met);
80 clock_t
begin = clock();
82 clock_t
end = clock();
86 clock_t begin2 = clock();
88 clock_t end2 = clock();
93 double hashTime =
double(end2 - begin2);
96 stringComparisonTimes.push_back(stringTime);
97 hashComparisonTimes .push_back(hashTime);
100 std::cout <<
"Avg time to run testStringComparisonVersion : " <<
calcMean(stringComparisonTimes)/CLOCKS_PER_SEC << std::endl;
101 std::cout <<
"Avg time to run testHashComparisonVersion : " <<
calcMean(hashComparisonTimes )/CLOCKS_PER_SEC << std::endl;
◆ testHashComparisonVersion()
Definition at line 44 of file testMETHash.cxx.
46 for(
size_t j = 0; j < 10000; ++j){
47 for(
size_t i = 0;
i < cont.
size(); ++
i ){
◆ testStringComparisonVersion()
Definition at line 33 of file testMETHash.cxx.
35 for(
size_t j = 0; j < 10000; ++j){
36 for(
size_t i = 0;
i < cont.
size(); ++
i ){