MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / ConstructRandomMap

Function ConstructRandomMap

deps/google-benchmark/test/map_test.cc:8–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace {
7
8std::map<int, int> ConstructRandomMap(int size) {
9 std::map<int, int> m;
10 for (int i = 0; i < size; ++i) {
11 m.insert(std::make_pair(std::rand() % size, std::rand() % size));
12 }
13 return m;
14}
15
16} // namespace
17

Callers 2

BM_MapLookupFunction · 0.85
SetUpMethod · 0.85

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected