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

Jorge Aldo G. de F. Junior jagfj80 at gmail.com
Fri Dec 9 19:00:30 CET 2011


even if FPC implemented a ultra high tech PRNG it would be compatible
with DELPHI :

1 - Delphi asserts that you should not use the Random function to
encryption porpuses.
2 - Delphi asserts no speed guarantees.
3 - Delphi asserts no randomness quality guarantees.

IE : to be compatible you only need the function to have the same
calling parameters and result type.

Formally, in that case, even this would be "compatible" :

Function Random(): Real;
Begin
Result := 4; { i throwed a dice to reach that result ! }
End;

2011/12/9 Graeme Geldenhuys <graemeg.lists at gmail.com>:
> On 9 December 2011 12:42, Jonas Maebe > wrote:
>>
>> It will improve the randomness of the generated numbers.
>
> Thanks Jonas.
>
>
>
> --
> Regards,
>   - Graeme -
>
>
> _______________________________________________
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://fpgui.sourceforge.net
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list