dev/Code/Framework/AzCore/Tests/AZStd/Hashed.cpp
// BM_UnorderedMap_InsertUniqueViaXXX: benchmark filling a map with unique values
benchmark filling a map with unique values
benchmark filling a map with unique values
static void BM_UnorderedMap_InsertUniqueViaInsert(::benchmark::State& state)
    {
        while (state.KeepRunning())
        {
            UnorderedMap map;
            for (int mapKey = 0; mapKey < kNumInsertions; ++mapKey)
            {
                A& a = map.insert(make_pair(mapKey, A{})).first->second;
                a.m_int += 1;
            }
        }
    }
static void BM_UnorderedMap_InsertUniqueViaInsert ( :: benchmark :: State & state ) { while ( state . KeepRunning ( ) ) { UnorderedMap map ; for ( int mapKey = 0 ; mapKey < kNumInsertions ; ++ mapKey ) { A & a = map . insert ( make_pair ( mapKey , A { } ) ) . first -> second ; a . m_int += 1 ; } } }
BM_UnorderedMap_InsertUniqueViaXXX: benchmark filling a map with unique values
BM_UnorderedMap_InsertUniqueViaXXX : benchmark filling a map with unique values