From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5891e7e61ca0dcd6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-01 17:43:04 PST Message-ID: <3C5B4EDB.F6CDFE36@greenlime.com> Date: Sat, 02 Feb 2002 10:28:43 +0800 From: Adrian Hoe Organization: Lexical Integration (M) Sdn Bhd X-Mailer: Mozilla 4.7C-CCK-MCD Caldera Systems OpenLinux [en] (X11; I; Linux 2.2.10 i586) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada implementation of Mersenne Twister (MT19937) References: <9ff447f2.0201280043.ced143d@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: mlk-172-204.tm.net.my X-Original-NNTP-Posting-Host: mlk-172-204.tm.net.my X-Trace: news.tm.net.my 1012614088 mlk-172-204.tm.net.my (2 Feb 2002 09:41:28 +0800) Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!news1.tm.net.my Xref: archiver1.google.com comp.lang.ada:19512 Date: 2002-02-02T10:28:43+08:00 List-Id: Adrian Hoe wrote: > > Hello, > > I could not find an Ada implementation of MT19937 pseudo random number > generator by searching CLA. So, I decided to port Makoto Matsumoto and > Takuji Nishimura's work to Ada. > > Thought someone might be interested to use MT19937. You can download > the source from my web site at http://greenlime.com/users/adrian.hoe Something interesting I found in Ada's while-loop and for-loop. I don't know if this have been discussed in CLA because I could not find anything related by searching with Google. My implementation of test3.adb uses while..loop (you can download adamt19937 source from my home page) and Christoph modified the while loop to a for..loop. The time recorded on my Linux machine using my implementation (while..loop) is 57seconds. But using Christoph for..loop, I recorded 107seconds on my same Linux machine (Christoph recorded 116seconds on WIndows98). It seems like for..loop is slower than while..loop. I did not realize the difference between them until I tested Christoph's test3. I thought it was WIndows98 problem. Any discussion? -- -- Adrian Hoe -- http://greenlime.com/users/adrian.hoe