From dfc36eee879ee001922e87b7ebb86f8ed0f6a0ed Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 20 Nov 2021 19:31:13 -0500 Subject: =?UTF-8?q?Update=20=E2=80=A2rand=20implementation=20intro=20parag?= =?UTF-8?q?raph?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/implementation/primitive/random.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/implementation') diff --git a/docs/implementation/primitive/random.html b/docs/implementation/primitive/random.html index c907ee1c..86c75219 100644 --- a/docs/implementation/primitive/random.html +++ b/docs/implementation/primitive/random.html @@ -5,7 +5,7 @@

Implementation of random stuff

-

Not a primitive, but CBQN's •MakeRand initializes a random number generator that has some built-in utilities. For clarity we'll call a result of this initialization rand in the text below.

+

BQN's random number utilities are provided by system functions and include some with non-obvious implementations. In the text below, rand represents any random number generator: •rand, or a result of •MakeRand.

Random number generation

CBQN is currently using wyrand, part of the wyhash library. It's extremely fast, passes the expected test suites, and no one's raised any concerns about it yet (but it's very new). It uses only 64 bits of state and doesn't have extra features like jump ahead.

Other choices are xoshiro++ and PCG. The authors of these algorithms (co-author for xoshiro) hate each other very much and have spent quite some time slinging mud at each other. As far as I can tell they both have the normal small bias in favor of their own algorithms but are wildly unfair towards the other side, choosing misleading examples and inflating minor issues. I think both generators are good but find the case for xoshiro a little more convincing, and I think it's done better in third-party benchmarks.

-- cgit v1.2.3