<p>Why sprinkle ifdefs everywhere? Change all calls to Random with calls to FastRandom, and have one ifdef there that uses Random in Delphi and a fast substitute in FPC. Still readable, still fast, and you would be done by now instead of spending so much time arguing about it. Plus, should Delphi decide to change their Random call to something slower in the next rev, you only have to change one routine to switch back to a faster version. Maybe later a patch could be worked on to implement FastRandom and BetterRandom in the RTL, and use some sort of procedure variable to allow Random to call one or the other. But you'd probably find the need to do that isn't so urgent once you've made the other change.</p>
<p>Jeff.</p>