[fpc-pascal] Why is Random(255) some 529x slower compared to Delphi 7?

Vincent Snijders vincent.snijders at gmail.com
Thu Dec 8 10:13:36 CET 2011


2011/12/8 Graeme Geldenhuys <graemeg.lists at gmail.com>:
> On 8 December 2011 09:25, Felipe Monteiro de Carvalho wrote:
>>
>> And what if it changes in the future to being slow and statistically
>> strong, we change again too?
>
> The random number generator can be implemented in such a way that the
> backend generator is user selectable.
>
>
>> And what about people using FPC only and depending on our Random being
>> statistically strong, they are less important then theorical Delphi
>> migrants?
>
> [like what was told to me numerous times before]  They (FPC users)
> should speak up now, or forever hold your peace.

When I used fpc in past to write statistical simulation I also
investigated the random number generator and was pleased to see that
it used the Mersenne Twister. I hope a upcoming change won't break my
programs or make there outcome suspect because of the poor quality of
the random number generator.

Writing a fast number generator is almost a one liner:
http://en.wikipedia.org/wiki/Linear_congruential_generator

Vincent (not holding his peace)



More information about the fpc-pascal mailing list