title: Simple C++ multithreading example is slower
body: <p>I am currently learning basic C++ multithreading and I implemented a very small code to learn the concepts. I keep hearing multithreading is faster so I tried the below :</p>
  <pre><code>    int main()
  {
      //---- SECTION 1
      Timer timer;
      Func();
      Func();
      
      //---- SECTION 2
      Timer timer;
      std::thread t(Func);
      Func();
      t.join();
  }
  </code></pre>
  <p>And below is the Timer,</p>
  <pre><code>Timer()
      {
          start = std::chrono::high_resolution_clock::now();
      }
  
      ~Timer()
      {
          end = std::chrono::high_resolution_clock::now();
          duration = end - start;
  
          //To get duration in MilliSeconds
          float ms = duration.count() * 1000.0f;
  
          std::cout &lt;&lt; &quot;Timer : &quot; &lt;&lt; ms &lt;&lt; &quot; milliseconds\n&quot;;
      }
  </code></pre>
  <p>When I implement Section 1 (the other commented out), I get times of 0.1ms,0.2ms and in that range but when I implement Section 2, I get 1ms and above. So it seems that Section 1 is faster even though it is running on the main thread but the Section 2 seems to be slower.</p>
  <p>Your answers would be much appreciated. If I am wrong in regards to any concepts, your help would be helpful.</p>
  <p>Thanks in advance.</p>