The random number generator is a strong candidate for being a plugin. It really is a fast one. A good way to use it is to fill a buffer at a time and dole the numbers out using a stream.
"Richard A. O'Keefe" ok@cs.otago.ac.nz is claimed by the authorities to have written:
The random number generator is a strong candidate for being a plugin.
I would agree; it's simple code, it has no complicated return values, it would benefit from trivial access to unsigned(!) and whenever I want random numbers I seem to need them rapidly. A plugin would cover it nicely.
And Mark said:
The information about the different way that Squeak and C handle unsigned long integers in shift operations was interesting but amazingly it made no difference in the outcome
Hmm. Have you compiled the C code and tested it? Just in case... it wouldn't be the first time that demo C code had some subtle mis-print in it.
To check further, knock up a little C prog to take a few numbers and do the various shifts/masks, and some Squeak code to do the same. Compare; it should at least illustrate where the differences are creeping in ot bite you. Chances are good that it is a single trivial typo-like error somewhere.
tim
squeak-dev@lists.squeakfoundation.org