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

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Dec 7 13:54:57 CET 2011


On 07 Dec 2011, at 13:51, Michael.VanCanneyt at Wisa.be wrote:

> I think the random() algorithm is simply much more complicated in FPC.

That's correct. We use the mersenne twister, Delphi probably a linear  
congruential generator. The mersenne twister has a much larger period.


Jonas



More information about the fpc-pascal mailing list