MCPcopy Create free account
hub / github.com/ETLCPP/etl / main

Function main

test/Performance/unordered_map/unordered_map/unordered_map.cpp:40–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38Etlmap etlmap;
39
40int main()
41{
42 StartTimer();
43
44 for (size_t i = 0UL; i < TESTINTERATIONS; ++i)
45 {
46 for (size_t j = 0UL; j < TESTSIZE; ++j)
47 {
48 std::pair<Stdmap::iterator, bool> ok = stdmap.insert(std::make_pair(uint64_t(j), uint16_t(j)));
49 }
50
51 for (size_t j = 0UL; j < TESTSIZE; ++j)
52 {
53 stdmap.erase(j);
54 }
55 }
56
57 uint64_t time;
58
59 time = StopTimer();
60 std::cout << "STD Time = " << time << "ms\n";
61
62 StartTimer();
63
64 for (size_t i = 0UL; i < TESTINTERATIONS; ++i)
65 {
66 for (size_t j = 0UL; j < TESTSIZE; ++j)
67 {
68 std::pair<Etlmap::iterator, bool> ok = etlmap.insert(std::make_pair(uint64_t(j), uint16_t(j)));
69 }
70
71 for (size_t j = 0UL; j < TESTSIZE; ++j)
72 {
73 etlmap.erase(j);
74 }
75 }
76
77 time = StopTimer();
78 std::cout << "ETL Time = " << time << "ms\n";
79
80 return 0;
81}
82

Callers

nothing calls this directly

Calls 5

StartTimerFunction · 0.85
make_pairFunction · 0.85
StopTimerFunction · 0.85
insertMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected