Since then the authors have been busy and knocked out a range of new generators. What caught my eye was the four new ones using 64 bit internal arithmetic. Two of them were designed for floating point work and are slightly faster than their general purpose versions but they have weaknesses. These weaknesses will be masked when only the floating point bits are used but extracting them will have an effect on the throughput so I ignored them. Of the two remaining, xoshiro256** and xoroshiro128**, the latter uses three rotations but the former uses only two rotations resulting in the former being faster. I opted, then, for xoshiro256**.
Now, I have written a few generators for FreeBASIC so why bother writing another one. As with FB, my generators use 32 bit internal arithmetic and output a Double so as to keep the 32 bit granularity. To get a genuine Double, ie with 53 bit granularity, we have to request two 32 bit numbers. When using 64 bit internal arithmetic we only need to request one 64 bit number. With this approach, I am getting a throughput of about 310MHz which is pretty good compared with PCG32II's throughput of 495MHz using 32 bit internal arithmetic.
This is what the authors say about xoshiro256**:
My initial tests always include an average generator output, Ulong or Ulongint, and an average Double precision output and some range tests. Obviously, if I got 0.6 for 10^7 double precision instead of close to 0.5 then my implementation is 'out of kelter'. Everything seemed fine so the next job was to dust down PractRand.This is xoshiro256** 1.0, our all-purpose, rock-solid generator. It has excellent (sub-ns) speed, a state (256 bits) that is large enough for any parallel application, and it passes all tests we are aware of.
xoshiro256** failed spectacularly within a few seconds with more FAIL!!!!!!!! than you can shake a stick at. FAIL!!!!!!!! is the worst failure PractRand reports with p values of zero. I spent some time going through my code and could not find anything wrong. So, I looked at xoroshiro128**. That went down the tubes as well.
Searched the internet and found that I am not alone.
I then found a discussion at reddit.com/r/programming which included posts by Melissa O'Neill ( Username: ProfONeill ), author of my PCG32II, and Sebastiano Vigna ( Username: sebastianovigna ), joint author of xoroshiro128** and xoshiro256**. These two were going at each 'hammer and tongs' and Vigna was bordering being vitriolic. Here is a link to the thread - it is a long one. I always knew that rivalry existed within the world of academia but I had not realized how heated it could be.
Needless to say, I shall not post any code, not that you could stand another generator from me <smille., which fails PractRand on the first hurdle.
So, why did I dust down PractRand after reading "rock-solid generator" and "it passes all tests we are aware of". It is sad but when you get to my age you probably won't believe anything you read and I want to see proof with my own eyes. I saw nothing of the sort.
I am sure that I have mentioned this but PractRand does not prove randomness. The null hypothesis is that a generator is random and if a PractRand test succeeds to 1TB or more then no evidence has been found to question the null hypothesis. Whatever O'Neill and Vigna say about each other's work O'Neill's PCG32, in particular, passes PractRand and Vigna's latest offerings do not. Having said that, I must admit that on reading some of O'Neill's blogs I have sometimes found myself stretching for the salt cellar figuring that a 'pinch of salt' was needed. <smile>