<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/154650>154650</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [libc++] Optimize `std::{map,set}::insert(Iterator, Iterator)`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++,
            performance
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            philnik777
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ldionne
      </td>
    </tr>
</table>

<pre>
    Similarly to what we did in https://github.com/llvm/llvm-project/pull/152691, we can perform an optimization for `std::map` and `std::set` when inserting a range of iterators.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUkcGOmzwUhZ_msrH-yFwwhoUXk0SR_lUXfQIDN3BbYyPbTDR9-gqSajrLSpZsncWxzvfZlHjyRAbUGRDXmZ3nn1prQAR1LeyW5xCNGzl4T0Ufxg_znRd2NroPkYN4zDaLB4mRR8FezDmvCao3wBvgbeI8b_1pCAvgzbn3P9d_aww_aMiAt3VzDvBWKmy6EvCydw3Wi5XiPcRFWC_CmnnhXzZz8OIeooBGpjzuv1Rvi12hkcL68UucKO_xYyYv2CeKmf0krIjWTyTCXXCmaHOI6VSMphq7qrMFmVIrpatKd20xm5YapDvVcui06nTftxp1P5RV2ap-1EPBBiUq2aLEqu5Ue7rXpW5rqbW0NA41Qi1psexO--hTiFPBKW1kSlU3ShbO9uTSC73jfgA8HwcBL7uNJwPrB3rpiObA129Tglo6Tjl9dmfO7hD5V5W6im9PfPSFD-jzTg4vOyh9fYZPUIDt_y84u4_PdweNLLbozD9LPlanQ_Mx_N3g7wAAAP__473F3w">