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

    <tr>
        <th>Summary</th>
        <td>
            Switch default_random_engine to PCG or Xorisho family of PRNGs?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Currently default_random_engine defaults to `minstd_rand`. Both PCG and Xorisho exhibit faster performance and better statistical properties.

The spec says:
> using default_random_engine = implementation-defined ;
10 Remarks: The choice of engine type named by this typedef is implementation-defined. [ Note: The
implementation may select this type on the basis of performance, size, quality, or any combination of
such factors, so as to provide at least acceptable engine behavior for relatively casual, inexpert, and/or
lightweight use. Because different implementations may select different underlying engine types, code
that uses this typedef need not generate identical sequences across implementations. — end note 

Nothing in the standardese indicates that the chosen implementation even has to be an exposed implementation and it allows the implementer to change the sequence across implementations. As such, perhaps it makes sense to leverage a different PRNG for `default_random_engine` that's best-in-class in terms of statistical properties and speed?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1VMFu2zoQ_Br5soghS0lsH3Rokqa3ouh7h3crVtJK5CtFuiTl1P36DimncYIUMGSKXM3O7syydf2puZ-9FxvNiXoZeDbxm2fbu-mb2FFbed4NFB0Vt-WkbYh9jsHbmu5cVPTl_hNhg_5zXgflSH4q3epIA4cong7iB-cntp3ksFZi2g6Row5Rd2zo4B2iopawLsqHovywPP9VQuEgHQU-haI-7xb1R5qDtuNfKBf1A-npYGRCYcjh7BUCcdLj6G7B2JT0VSb23xMspTydchoE3UBnmHg6CFme8Fl7oqh0yFuAIizfT7Cm4uaOPrsoZ9gl2-tgmvhEQYx08QWWsB9Bo-WAHbC46FpR3VPQv_L_j5mNjqe0dB7tPFHnplbbBdkNS8Iwdwrt76LzIX_tiLOEaPRR99A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