<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/61459>61459</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Switch to in-place std::stable_sort
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
higher-performance
</td>
</tr>
</table>
<pre>
Hi, I just wanted to suggest switching to an in-place `std::stable_sort` implementation - one candidate for this being [WikiSort](https://github.com/BonzaiThePenguin/WikiSort).
These are relatively modern algorithms designed to asymptotically minimize the number of comparisons, swaps, etc. while avoiding dynamic memory allocation, and it would be great to utilize them.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8Urtu5DgQ_BoqaYygoR6WAgX2GYO77AAbuPDQEnvE9vIhkC0Pxl-_kNbrTRabkATRVawqFubMSyAaVfuk2ucCN7ExjZYXS-m0UrrG5DHMVEzR3Me_Wem_4B9427LADYOQAYmQt2WhLJBvLLPlsOyXGIDDaXU4E6iuymJU_ajqxyw4Ofo_xySqq4D96shTEBSOAU4QA8GMwbBBIbjGBGI5w0Q7r2qf_uNv_LKD22eleyuy5p1YX5S-LCx2m8o5eqUvTzF8IL9a-pfCsnFQ-vKF1UOpqmdVPf5YXy1lAkwEiRwKv5O7g4-GUgB0S0ws1mcwdKR1eMZ896tE4RndPsyBPX8QiCUIm58oQbzCHP2KiXMMeU8u33A9DiRzCTfLjgDfI5vdm7kH9DyDJx_THdC5OB-h7AAMBljgFjdnYCJYEqHsOjZh9_muLwsz1maoByxoPHcP_TC0lW4KO7Zmrs79Q62xa1v90HR9P_XdMGHT9ThVuuBRV7qu6nN3HupKN-UwzB1WbU3dtUGcrqqpyCO70rl3X8a0FJzzRmN3btqhcDiRyz9blMZ96DRtS1ZN5ThL_gUTFkfjy1GV3cBXSX7XkGJLbvzDH--sn9tpTfGNZlH6cijLSl8Ocd8DAAD__3vo-dQ">