Baveco, Dr. J.M. From: David N. Smith (IBM) [dnsmith@watson.ibm.com] Sent: Thursday, November 04, 1999 9:41 PM To: squeak@cs.uiuc.edu Subject: Re: TT800 (was RE: PRNGs (was [Q] Project: Better performance for LargeIntegers)) At 14:09 -0500 11/2/99, Jeff Szuhay wrote: >>At 13:25 -0500 11/2/99, Jeff Szuhay wrote: >>>...SNIP... >>>and finally, >>> >>>tt800 source code: >> >>Jeff: >> >>Can you check this link again? I can get to >>http://random.mat.sbg.ac.at/ftp/pub but the daa directory is >>missing and nothing else seems to have a tt800.c file. > >Oops... > >change .../daa/... to ... /data/... >and the page will appear. OK, I got it and have converted it to Squeak (with some testing assistance from Jeff). The code is attached. It's basically a straight conversion from C. It uses, by its nature, 32-bit long integers and is slow by a factor of about 30 relative to Squeak's Random class. References and abstracts to the papers are included in the class comment. The original C code (less its tiny main program) is in a method as a comment. There are class methods that test the generator and also assure that it answers the same results as the C version. This is a good example of why long integers need to be fast, and how easy it is to hit that performance brick wall. If you are using Random, you can try this by changing the class name to RandomTT800. The #next method answers the next pseudo-random number and #seed: resets the seed. The generator automatically self seeds from the millisecond clock. Dave