Why not use the previous fpc version - I guess similar to that in delphi- I can remember an email when Jonas changed it quite a few years ago - Jonas must have older version - but can't really remember the fpc version - v1.0? My guess it could be found in either svn or more likely the older cvs fpc archive. <div>
<br></div><div>John <br></div><br><div class="gmail_quote">On 7 December 2011 13:10, Graeme Geldenhuys <span dir="ltr"><<a href="mailto:graemeg.lists@gmail.com">graemeg.lists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On 7 December 2011 14:54, Jonas Maebe wrote:<br>
><br>
> That's correct. We use the mersenne twister, Delphi probably a linear<br>
> congruential generator. The mersenne twister has a much larger period.<br>
<br>
OK thanks for the info. This is a serious performance hit, but I<br>
understand that the FPC implementation is different. Does FPC have a<br>
faster (comparable to Delphi) version of Random() too?<br>
<br>
@Michael,<br>
Should the FPC docs maybe mention the fact that the FPC version is<br>
considerably slower that Delphi (with an explanation why of course) -<br>
purely for the purpose of informing those porting code from Delphi to<br>
FPC. The original code in tiOPF is so slow, I almost thought the<br>
program froze - thus making that code really unusable in an<br>
application. Luckily that code will normally not be used in a real app<br>
though. Delphi developers wanting to move to FPC should really be<br>
warned about this, and use Random() sparingly.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Regards,<br>
- Graeme -<br>
<br>
<br>
_______________________________________________<br>
fpGUI - a cross-platform Free Pascal GUI toolkit<br>
<a href="http://fpgui.sourceforge.net" target="_blank">http://fpgui.sourceforge.net</a><br>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</font></span></blockquote></div><br>