Hacker News new | ask | show | jobs
by pbsd 4364 days ago
Skipping ahead is not new; it is a well-known fact that any linearly recurrent generator, such as WELL, Xorshift, or Mersenne Twister can skip ahead via matrix exponentiation.

And it is not the only way to get good independent streams either; hooking a cipher with a counter is arguably a superior way to do it, cf [1].

[1] http://www.thesalmons.org/john/random123/papers/random123sc1...

2 comments

I like that paper. Thank you. It has references which criticize the skipahead technique. I need to look into whether I believe that paper, though. There are lots of ideas about how to do this, and subtle flaws abound. While many generators are known to skipahead, there is a quite new technique for MT that makes it much faster, not by Barash and Shchur, but they used it. Again, thanks.
A million times thank you for that link! I've been needing something exactly like that for a pet project of mine.