title: Understanding Google Benchmark Result
body: <p>I am doing a benchmark of the performance of various Hash table implementations. The code reads integers from an in-memory vector and writes them to the hash table. </p>
  
  <p>Here's my code for the benchmark base class</p>
  
  <pre><code>class ConcurrentBenchmark : public benchmark::Fixture {
  protected:
  
      vector&lt;int32_t&gt; values;
  
  public:
  
      ConcurrentBenchmark() {
          srand(time(NULL));
  
          int total = 1000000;
  
          for (int i = 0; i &lt; total; ++i) {
              values.push_back(rand() % 1000);
          }
      }
  
      virtual ~ConcurrentBenchmark() {}
  };
  
  BENCHMARK_F(ConcurrentBenchmark, Int32) {...}
  
  BENCHMARK_F(ConcurrentBenchmark, Int64) {...}
  
  BENCHMARK_F(ConcurrentBenchmark, StlInt32) {...}
  
  BENCHMARK_F(ConcurrentBenchmark, StlInt64) {...}
  </code></pre>
  
  <p>Here's the result.</p>
  
  <pre><code>-----------------------------------------------------------------------
  Benchmark                             Time             CPU   Iterations
  -----------------------------------------------------------------------
  ConcurrentBenchmark/Int32       4612777 ns      1081463 ns          645
  ConcurrentBenchmark/Int64       6192677 ns      2234226 ns          300
  ConcurrentBenchmark/StlInt32    8101856 ns      8101747 ns           86
  ConcurrentBenchmark/StlInt64    7958493 ns      7958290 ns           88
  </code></pre>
  
  <p>My question is: it seems like the CPU time is aligned with Iterations, e.g., CPU * Iterations is a constant. But what does the "Time" column tells us? Does this time include the initialization, e.g., filling the in-memory buffers?</p>