title: Fast way to generate random sample data using delphi
body: <p>i have  a struture like this </p>
  
  <pre><code>const
    MaxSignalRecords=255;
  type
    TSignalRecord=record
     signal1  : integer;
     signal2  : integer;
     signal3  : integer;
     signal4  : integer;
     signal5  : integer;
     signal6  : integer;
     bsignal1 : Boolean;
     bsignal2 : Boolean;
     bsignal3 : Boolean;
     bsignal4 : Boolean;
     bsignal5 : Boolean;
     bsignal6 : Boolean;
    end;
  
  TListSignals = Array[0..MaxSignalRecords-1] of TSignalRecord;
  </code></pre>
  
  <p>and a procedure to generate random sample data</p>
  
  <pre><code>Procedure FillRandomListSignals(var ListSignals:TListSignals);
  var
    i :Integer;
  begin
    for i := 0 to MaxSignalRecords - 1 do
    with ListSignals[i] do
    begin
     signal1   :=Random(MaxInt);
     signal2   :=Random(MaxInt);
     signal3   :=Random(MaxInt);
     signal4   :=Random(MaxInt);
     signal5   :=Random(MaxInt);
     signal6   :=Random(MaxInt);
     bsignal1  :=Boolean(Random(2));
     bsignal2  :=Boolean(Random(2));
     bsignal3  :=Boolean(Random(2));
     bsignal4  :=Boolean(Random(2));
     bsignal5  :=Boolean(Random(2));
     bsignal6  :=Boolean(Random(2));
    end;
  end;
  </code></pre>
  
  <p>How i can improve the performance of  the <code>FillRandomListSignals</code> procedure ?</p>
  
  <p><strong>Edit</strong> : this structure is used to make thousands(can be millions) of calculations </p>
  
  <pre><code>for i:=1 to 1000000 do
  begin
    CleartheList(MyList);
    FillRandomListSignals(MyList);
    DotheMath(MyList);
    DotheChart(MyList);
  end;
  </code></pre>