Changeset 79 for Generics


Ignore:
Timestamp:
Oct 30, 2010, 6:46:24 PM (14 years ago)
Author:
george
Message:
  • Fixed: Process messages during benchmark.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Generics/TemplateGenerics/Demo/UMainForm.pas

    r78 r79  
    210210    WriteLn('Add: ' + IntToStr(List.Count) + ' ops/sec');
    211211    List.Clear;
     212    Application.ProcessMessages;
    212213
    213214    StartTime := Now;
     
    217218    WriteLn('Insert: ' + IntToStr(List.Count) + ' ops/sec');
    218219    List.Clear;
     220    Application.ProcessMessages;
    219221
    220222    for I := 0 to 1000000 do
     
    228230    WriteLn('Delete: ' + IntToStr(I) + ' ops/sec');
    229231    List.Clear;
     232    Application.ProcessMessages;
    230233
    231234    for I := 0 to 1000000 do
     
    239242    WriteLn('Move: ' + IntToStr(I) + ' ops/sec');
    240243    List.Clear;
     244    Application.ProcessMessages;
    241245
    242246    for I := 0 to 1000000 do
     
    250254    WriteLn('Exchange: ' + IntToStr(I) + ' ops/sec');
    251255    List.Clear;
     256    Application.ProcessMessages;
    252257
    253258    for I := 0 to 1000000 do
     
    261266    WriteLn('IndexOf: ' + IntToStr(I) + ' ops/sec');
    262267    List.Clear;
     268    Application.ProcessMessages;
    263269  finally
    264270    List.Free;
     
    274280    WriteLn('Add: ' + IntToStr(List2.Count) + ' ops/sec');
    275281    List2.Clear;
     282    Application.ProcessMessages;
    276283
    277284    StartTime := Now;
     
    281288    WriteLn('Insert: ' + IntToStr(List2.Count) + ' ops/sec');
    282289    List2.Clear;
     290    Application.ProcessMessages;
    283291
    284292    for I := 0 to 1000000 do
     
    291299    until (Now - StartTime) > OneSecond;
    292300    WriteLn('Delete: ' + IntToStr(I) + ' ops/sec');
     301    Application.ProcessMessages;
    293302
    294303    for I := 0 to 1000000 do
     
    301310    until (Now - StartTime) > OneSecond;
    302311    WriteLn('Move: ' + IntToStr(I) + ' ops/sec');
     312    Application.ProcessMessages;
    303313
    304314    for I := 0 to 1000000 do
     
    311321    until (Now - StartTime) > OneSecond;
    312322    WriteLn('Exchange: ' + IntToStr(I) + ' ops/sec');
     323    Application.ProcessMessages;
    313324
    314325    for I := 0 to 1000000 do
     
    321332    until (Now - StartTime) > OneSecond;
    322333    WriteLn('IndexOf: ' + IntToStr(I) + ' ops/sec');
     334    Application.ProcessMessages;
    323335
    324336  finally
Note: See TracChangeset for help on using the changeset viewer.