For some time now I've been unhappy with the way we handle random numbers. The
whole thing was a dogs breakfast of adjustments and patches - well rather less
so now :)
By using the Linux random_r() function, we lost portability and the patch for
BSD created a potential problem for multiple instances, so I started a search
for one that was truly portable and able to be built into Yoshimi. It doesn't
seem that anyone else tried to do this, as I quite quickly found the Bob Jenkins
"A Small Noncryptographic PRNG" which he apparently publicised in 2007.
If you want to know more, and how well respected this is look here:
So apart from portability, what do we get?
Well for a start, even unoptimised it's faster than the Linux built-in one.
It's really rather small.
You can pull 128 *TERABYTES* of numbers from it before it repeats. Even in my
test routine (with nothing else happening) that would take over an hour, so I
felt justified in significantly reducing the number of times it was re-seeded.
This in itself seems to have made a very tiny reduction in note-on time.
It's in the latest build :)
Will J Godfrey
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either:
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx