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

Florian Klaempfl florian at freepascal.org
Fri Dec 9 09:18:38 CET 2011


Am 09.12.2011 08:59, schrieb Graeme Geldenhuys:
> On 9 December 2011 09:47, Florian Klaempfl wrote:
>>
>> According to measurements of me and other peoples, random is only 7-10
>> times slower (depending on the CPU).
> 
> What do you feed your computer, 

Nothing, but I don't mess with things I don't understand :) Changing
randseed (and makes absolutely no change except if your random generator
might be bad ;)) during random number generation is really a bad idea:

c:\>test
Length(psData) = 200401
ByteValue: 187
Length(Source) = 200401
First Loop....
elapsed time: 6751

c:\>test
Length(psData) = 200401
ByteValue: 174
Length(Source) = 200401
First Loop....
elapsed time: 60

> because mine differs vastly from yours.



More information about the fpc-pascal mailing list