title: Google benchmark returning more time of int divison from double
body: <p>I am new to google benchmark tool, I am testing all the operation timings.Please find my code as below.In this code i am testing how much time each operation (add / sub /mul /div) will take on my hardware.</p>
  
  <pre><code>#include &lt;benchmark/benchmark.h&gt;
  
  
  double min(double)
  {
    return 2.2;
  }
  
  double max(double)
  {
    return 8.8;
  }
  
  int min(int)
  {
    return 2;
  }
  
  int max(int)
  {
    return 8;
  }
  
  template &lt;typename Data&gt;
  void bench_mark_mul(benchmark::State &amp;state)
  {
    Data a, b;
    a = min(a);
    b = max(b);
  
    while (state.KeepRunning())
    {
      benchmark::DoNotOptimize(a * b);
    }
  }
  
  template &lt;typename Data&gt;
  void bench_mark_div(benchmark::State &amp;state)
  {
    Data a, b;
    a = min(a);
    b = max(b);
  
    while (state.KeepRunning())
    {
      benchmark::DoNotOptimize(a / b);
    }
  }
  
  template &lt;typename Data&gt;
  void bench_mark_sum(benchmark::State &amp;state)
  {
    Data a, b;
    a = min(a);
    b = max(b);
  
    while (state.KeepRunning())
    {
      benchmark::DoNotOptimize(a + b);
    }
  }
  
  template &lt;typename Data&gt;
  void bench_mark_dif(benchmark::State &amp;state)
  {
    Data a, b;
    a = min(a);
    b = max(b);
  
    while (state.KeepRunning())
    {
      benchmark::DoNotOptimize(a - b);
    }
  }
  
  BENCHMARK_TEMPLATE1(bench_mark_dif, double);
  BENCHMARK_TEMPLATE1(bench_mark_sum, double);
  BENCHMARK_TEMPLATE1(bench_mark_mul, double);
  BENCHMARK_TEMPLATE1(bench_mark_div, double);
  
  BENCHMARK_TEMPLATE1(bench_mark_dif, int);
  BENCHMARK_TEMPLATE1(bench_mark_sum, int);
  BENCHMARK_TEMPLATE1(bench_mark_mul, int);
  BENCHMARK_TEMPLATE1(bench_mark_div, int);
  
  BENCHMARK_MAIN();
  </code></pre>
  
  <p><strong>i am getting below results.</strong></p>
  
  <p><a href="https://i.stack.imgur.com/0daeq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0daeq.png" alt="enter image description here"></a></p>
  
  <p>Why double division time less then int division ?
  As i am making conclusion its due to conversion from float to int when we are dividing 
  the number?</p>