SIMD-oriented Fast Mersenne Twister (SFMT)

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

SIMD-oriented Fast Mersenne Twister (SFMT)

Post by Denis P. Mendoza »

I don't know if this was already discussed here, but it's sure to hear some comments.
This pseudo-random number generator, specifically the MT19937, has been updated following the advancement of processors these days. Has anybody tried the latest revised "SIMD-oriented Fast Mersenne Twister" on the chess engines?

http://en.wikipedia.org/wiki/Mersenne_twister
http://www.math.sci.hiroshima-u.ac.jp/~ ... index.html

Based on their tests:
http://www.math.sci.hiroshima-u.ac.jp/~ ... speed.html

...the SFMT(w/ or sithout SIMD) is 2 - 3 times faster than the regular MT.

Based on this, will it actually help improve chess engine codes?
Pradu
Posts: 287
Joined: Sat Mar 11, 2006 3:19 am
Location: Atlanta, GA

Re: SIMD-oriented Fast Mersenne Twister (SFMT)

Post by Pradu »

Denis P. Mendoza wrote:I don't know if this was already discussed here, but it's sure to hear some comments.
This pseudo-random number generator, specifically the MT19937, has been updated following the advancement of processors these days. Has anybody tried the latest revised "SIMD-oriented Fast Mersenne Twister" on the chess engines?

http://en.wikipedia.org/wiki/Mersenne_twister
http://www.math.sci.hiroshima-u.ac.jp/~ ... index.html

Based on their tests:
http://www.math.sci.hiroshima-u.ac.jp/~ ... speed.html

...the SFMT(w/ or sithout SIMD) is 2 - 3 times faster than the regular MT.

Based on this, will it actually help improve chess engine codes?
I guess not. Most programs probably use MT or something else for the initialization of the chess engine. It won't help the actual play.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: SIMD-oriented Fast Mersenne Twister (SFMT)

Post by Dann Corbit »

Denis P. Mendoza wrote:I don't know if this was already discussed here, but it's sure to hear some comments.
This pseudo-random number generator, specifically the MT19937, has been updated following the advancement of processors these days. Has anybody tried the latest revised "SIMD-oriented Fast Mersenne Twister" on the chess engines?

http://en.wikipedia.org/wiki/Mersenne_twister
http://www.math.sci.hiroshima-u.ac.jp/~ ... index.html

Based on their tests:
http://www.math.sci.hiroshima-u.ac.jp/~ ... speed.html

...the SFMT(w/ or sithout SIMD) is 2 - 3 times faster than the regular MT.

Based on this, will it actually help improve chess engine codes?
I have profiled lots of chess engines and many that use MT. I guess that you will not see much change, because MT is usually so low on the profile that it is insignificant. I guess that the change will be so small you can't measure it. On the other hand, if a chess engine uses a prng extensively, it might see some boost. On the other, other hand, it is always fun to play with a new toy. I'm going to try it, of course.
User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Re: SIMD-oriented Fast Mersenne Twister (SFMT)

Post by Denis P. Mendoza »

Thanks for the infos. I only asked as a lot of programs only used the old PRNG version on the engine codes. But it is no harm too if we try testing a new toy for a change. Though it might not theoretically help a chess engine in actual play, there is most likely an advantage in other areas based on the improvements mentioned on the site.