[Lazarus] File write speed and random function

JoshyFun joshyfun at gmail.com
Mon Aug 17 21:48:48 CEST 2009


Hello Lazarus,

Monday, August 17, 2009, 7:37:21 PM, you wrote:

JH> for i := low(CopyArray) to high(CopyArray) do
JH>     CopyArray[i] := random(10000);

JH> for i := low(CopyArray) to high(CopyArray) do
JH>     CopyArray[i] := 77777;

Measure the time of both routines performing it 100 or 1000 times. I'm
quite sure that the random function is the problem itself. Disk caches
will hide facts because the second write will be processed after the
random numbers are being generated and confuse the tests, so isolate
both processes.

-- 
Best regards,
 JoshyFun





More information about the Lazarus mailing list