title: Why doesn't std::deque allow specifying the bucket size?
body: <p><code>std::deque</code> stores elements in "buckets" (arrays) of fixed size. Different compilers use different bucket sizes:</p>
  
  <ul>
  <li>MSVC: 16 bytes or element size if it's bigger </li>
  <li>GCC: 512 bytes or element size if it's bigger </li>
  <li>Clang: <code>element_size &lt; 256 ? 4096 : element_size * 16</code></li>
  </ul>
  
  <p>For MSVC (especially) and GCC, if the deque element size is bigger than the hardcoded size, <code>std::deque</code> turns into a convoluted <code>std::list</code> with performance penalties in the majority of cases.</p>
  
  <p>Clang does better in my opinion, no matter what the size of the deque element, the bucket will be at least 16 elements. Though the minimal bucket size of 4096 bytes can be sub-optimal in some cases for small elements.</p>
  
  <p>Why doesn't <code>std::deque</code> have an additional template parameter for bucket size with the default value of what the vendor thinks is reasonable? This wouldn't break backward compatibility but would allow performance optimisation.</p>