TalkChess.com
Hosted by Your Move Chess & Games

Author Message
Lucas Braesch

Joined: 31 May 2010
Posts: 2951

Post subject: Re: C# Performance    Posted: Mon Feb 13, 2012 5:52 am

 Ron Murawski wrote: 'Best' is a slippery word. If I wanted a cryptographically secure PRNG I wouldn't use KISS, I would use something stronger. But, if I wanted to bang out good PRNs as quickly as possible, then KISS would be a good choice. Keep in mind that MersenneTwister would also be a very good choice.

I don't understand the link between cryptography and RNG. All we want is an RNG that is relatively fast and easy to code (that excludes the mersenne twister right away), and that passes all known statistical tests. As far as I know the KISS RNG that I use in DoubleCheck passes all known statistical tests and is very simple. Another example is the KISS generator in Stockfish. Here's what I use in DoubleCheck, I would be glad if you could provide an example of statistical test where this generator fails, and where another one succeeds:
 Code: uint64_t rand64() // JLKISS 64-bit RNG, by Pr. David Jones, UCL Bioinformatics Lab {    // seed variables    static uint64_t x = 123456789123ULL, y = 987654321987ULL;    static uint32_t z1 = 43219876, c1 = 6543217, z2 = 21987643, c2 = 1732654;    x = 1490024343005336237ULL * x + 123456789;    y ^= y << 21; y ^= y >> 17; y ^= y << 30;   // do not set y=0    uint64_t t;    t = 4294584393ULL * z1 + c1; c1 = t >> 32; z1 = t;    t = 4246477509ULL * z2 + c2; c2 = t >> 32; z2 = t;    return x + y + z1 + ((uint64_t)z2 << 32);   // return 64-bit result }

Note that Mersenne Twister passes all known statistical tests, but fails in some linear complexity tests. This is not an issue for chess programming (as all the RNG are drawn at the start of the program once and for all). But the real issue I have with MT is that it's obfuscated, while KISS generators are much simpler (and faster) and perform just as well (speed aside where they beat MT anytime)
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
Subject Author Date/Time
Richard Allbert Fri Jan 27, 2012 8:41 pm
Kevin Hearn Fri Jan 27, 2012 9:01 pm
Richard Allbert Fri Jan 27, 2012 9:13 pm
Gary Fri Jan 27, 2012 9:07 pm
Richard Allbert Fri Jan 27, 2012 9:17 pm
Gary Fri Jan 27, 2012 10:09 pm
Mark Pearce Sat Jan 28, 2012 12:59 am
Richard Allbert Sat Jan 28, 2012 8:44 am
Sven Schüle Sat Jan 28, 2012 9:48 am
Richard Allbert Sat Jan 28, 2012 10:25 am
Richard Allbert Sat Jan 28, 2012 11:41 am
Mark Pearce Sat Jan 28, 2012 11:44 am
Richard Allbert Sat Jan 28, 2012 10:31 am
Marco Costalba Sat Jan 28, 2012 1:09 pm
Lucas Braesch Sat Jan 28, 2012 1:52 pm
Richard Allbert Sat Jan 28, 2012 2:05 pm
Marco Costalba Sat Jan 28, 2012 2:30 pm
Richard Allbert Sat Jan 28, 2012 5:22 pm
Sven Schüle Sat Jan 28, 2012 6:02 pm
Richard Allbert Sat Jan 28, 2012 6:12 pm
Robert Purves Sat Jan 28, 2012 10:17 pm
Marco Costalba Sat Jan 28, 2012 10:25 pm
Thomas Petzke Sat Jan 28, 2012 4:21 pm
Richard Allbert Mon Jan 30, 2012 12:52 pm
Marco Costalba Mon Jan 30, 2012 6:37 pm
Richard Allbert Wed Feb 01, 2012 6:55 pm
Marco Costalba Wed Feb 01, 2012 7:18 pm
Mark Pearce Mon Jan 30, 2012 9:55 pm
Richard Allbert Wed Feb 01, 2012 6:57 pm
Mark Pearce Wed Feb 01, 2012 9:59 pm
Mark Pearce Fri Feb 03, 2012 1:34 am
Robert Purves Fri Feb 03, 2012 3:26 am
Mark Pearce Fri Feb 03, 2012 9:28 am
Sven Schüle Fri Feb 03, 2012 9:45 am
Mark Pearce Sat Feb 04, 2012 7:57 pm
Sven Schüle Sat Feb 04, 2012 10:36 pm
Mark Pearce Sat Feb 04, 2012 11:49 pm
Sven Schüle Sun Feb 05, 2012 12:51 am
Mark Pearce Sun Feb 05, 2012 1:05 am
Sven Schüle Fri Feb 03, 2012 10:04 am
Mark Pearce Fri Feb 03, 2012 11:40 am
Richard Allbert Sat Feb 04, 2012 7:10 pm
Lucas Braesch Sat Feb 04, 2012 8:31 pm
Mark Pearce Sat Feb 04, 2012 10:23 pm
Mark Pearce Sun Feb 05, 2012 12:23 am
Lucas Braesch Sun Feb 05, 2012 2:57 am
Mark Pearce Sun Feb 05, 2012 11:40 am
Richard Allbert Mon Feb 06, 2012 6:29 pm
Richard Allbert Mon Feb 06, 2012 6:29 pm
Richard Allbert Mon Feb 06, 2012 6:30 pm
Richard Allbert Mon Feb 06, 2012 6:45 pm
Gary Mon Feb 06, 2012 7:00 pm
Richard Allbert Mon Feb 06, 2012 7:12 pm
Sven Schüle Mon Feb 06, 2012 10:50 pm
Richard Allbert Tue Feb 07, 2012 9:52 am
Richard Allbert Tue Feb 07, 2012 9:53 am
Richard Allbert Tue Feb 07, 2012 9:53 am
Richard Allbert Tue Feb 07, 2012 9:54 am
Mark Pearce Tue Feb 07, 2012 1:59 pm
Richard Allbert Tue Feb 07, 2012 2:54 pm
Richard Allbert Tue Feb 07, 2012 3:06 pm
Mark Pearce Tue Feb 07, 2012 5:17 pm
Richard Allbert Tue Feb 07, 2012 6:10 pm
Richard Allbert Tue Feb 07, 2012 6:20 pm
Mark Pearce Tue Feb 07, 2012 8:02 pm
Richard Allbert Tue Feb 07, 2012 9:19 pm
Mark Pearce Tue Feb 07, 2012 10:20 pm
Richard Allbert Wed Feb 08, 2012 7:47 am
Richard Allbert Wed Feb 08, 2012 7:57 am
Sven Schüle Wed Feb 08, 2012 10:09 am
Mark Pearce Wed Feb 08, 2012 12:16 pm
Vincent Diepeveen Sat Feb 18, 2012 10:03 pm
Mark Pearce Wed Feb 08, 2012 9:30 am
Richard Allbert Wed Feb 08, 2012 12:02 pm
Richard Allbert Wed Feb 08, 2012 12:34 pm
Mark Pearce Wed Feb 08, 2012 12:56 pm
Richard Allbert Wed Feb 08, 2012 1:18 pm
Richard Allbert Wed Feb 08, 2012 2:30 pm
Richard Allbert Wed Feb 08, 2012 2:34 pm
Mark Pearce Wed Feb 08, 2012 3:02 pm
Richard Allbert Wed Feb 08, 2012 3:27 pm
Richard Allbert Wed Feb 08, 2012 3:29 pm
Richard Allbert Wed Feb 08, 2012 3:59 pm
Richard Allbert Wed Feb 08, 2012 4:04 pm
Mark Pearce Wed Feb 08, 2012 6:07 pm
Richard Allbert Thu Feb 09, 2012 10:41 am
Mark Pearce Thu Feb 09, 2012 1:47 pm
Richard Allbert Thu Feb 09, 2012 2:56 pm
Mark Pearce Sat Feb 11, 2012 4:41 pm
Richard Allbert Sun Feb 12, 2012 8:34 am
Lucas Braesch Sun Feb 12, 2012 10:52 am
Richard Allbert Sun Feb 12, 2012 12:26 pm
Ron Murawski Mon Feb 13, 2012 5:26 am
Re: C# Performance Lucas Braesch Mon Feb 13, 2012 5:52 am
Richard Allbert Mon Feb 13, 2012 6:27 am
Ron Murawski Tue Feb 14, 2012 6:38 am
Lucas Braesch Tue Feb 14, 2012 8:22 am
Mark Pearce Tue Feb 14, 2012 11:30 pm
Richard Allbert Thu Feb 16, 2012 10:49 am
Mark Pearce Sat Feb 18, 2012 12:34 pm
Richard Allbert Mon Feb 20, 2012 9:19 pm
Mark Pearce Tue Feb 21, 2012 8:33 am
Richard Allbert Tue Feb 21, 2012 6:37 pm
Vincent Diepeveen Sat Feb 18, 2012 10:19 pm
Mark Pearce Sun Feb 12, 2012 2:01 pm
Richard Allbert Sun Feb 12, 2012 4:40 pm
Vincent Diepeveen Sat Feb 18, 2012 10:06 pm
Mark Pearce Sun Feb 19, 2012 1:01 pm
Vincent Diepeveen Sun Feb 19, 2012 5:25 pm
Mark Pearce Sun Feb 19, 2012 7:04 pm
Vincent Diepeveen Sun Feb 19, 2012 9:17 pm
Mark Pearce Sun Feb 19, 2012 11:33 pm
Richard Allbert Sun Feb 19, 2012 9:22 pm
Vincent Diepeveen Sun Feb 19, 2012 9:32 pm
Vincent Diepeveen Sun Feb 19, 2012 9:37 pm
Vincent Diepeveen Sun Feb 19, 2012 10:06 pm
Lucas Braesch Wed Feb 08, 2012 10:56 am
Mark Pearce Wed Feb 08, 2012 11:30 am
Richard Allbert Wed Feb 08, 2012 12:04 pm
Tony Soares Tue Feb 07, 2012 3:47 am
Richard Allbert Tue Feb 07, 2012 9:55 am
Mark Pearce Sat Feb 04, 2012 8:37 pm

 Jump to: Select a forum Computer Chess Club Forums----------------Computer Chess Club: General TopicsComputer Chess Club: Tournaments and MatchesComputer Chess Club: Programming and Technical DiscussionsComputer Chess Club: Engine Origins Other Forums----------------Chess Thinkers ForumChess Players ForumForum Help and Suggestions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads