title: pmr::vector is slower than std::vector
body: <p>I wrote a simple  <a href="https://quick-bench.com/q/S8ARu3pDu_XJSf1MLkta0sGq7-E" rel="nofollow noreferrer">benchmark </a>  to see what is the gain  of using pmr::vector in comparison with std::vector.</p>
  <p>In benchmarks , pmr::vector uses n unsynchronized_pool_resource . As upstream a monotonic buffer is used as well.
  Have a look in benchmark code</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;memory_resource&gt;
  #include &lt;chrono&gt;
  #include &lt;functional&gt;
  
  static void pmrVector(benchmark::State&amp; state)
  {
     constexpr size_t BUF_SIZE = 2048;
     std::pmr::pool_options options;
     options.max_blocks_per_chunk = 4;
     options.largest_required_pool_block = 64;
     
      alignas(8) std::array&lt;char,BUF_SIZE&gt; buffer; // a small buffer on the stack
    
      //std::cout &lt;&lt;options.largest_required_pool_block &lt;&lt; std::endl;
     std::pmr::monotonic_buffer_resource pool{std::data(buffer), std::size(buffer)};
    std::pmr::unsynchronized_pool_resource mem (options,&amp;pool);
    for (auto _ : state) 
    {
      
      std::pmr::vector&lt;char&gt; vec{ &amp;mem };
      for(char i = 'a'; i &lt; 'z';++i)
      {
              
              vec.emplace_back(i);
              benchmark::DoNotOptimize(vec);
              
      }
  
      
    }
  }
  static void stdVector(benchmark::State&amp; state)
  {
     
     for (auto _ : state) 
     {
        std::vector&lt;char&gt; vec{};
        for(char i = 'a'; i &lt; 'z';++i)
        {
              
              vec.emplace_back(i);
              benchmark::DoNotOptimize(vec);
              
        }
     }
  }
  BENCHMARK(pmrVector);
  BENCHMARK(stdVector);
  </code></pre>
  <p>The pmr::vector is 3x slower that std::vector. Comparing with monotonic buffer seems that the unsynchronized_pool_resource has huge penalty.
  Have a look in this benchmark <a href="https://quick-bench.com/q/2lvtR3zdtsA_ekmBTzzWRQhUsaQ" rel="nofollow noreferrer">benchmark monotonic buffer only</a></p>
  <p>Performance comparison using unsynchronized_pool_resource</p>
  <p><a href="https://i.stack.imgur.com/86qhk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/86qhk.png" alt="enter image description here" /></a></p>
  <p>Have a look in performance comparison using only monotonic buffer
  <a href="https://i.stack.imgur.com/A6bNd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A6bNd.png" alt="enter image description here" /></a></p>