Entschuldigung, habe den "Helm" leider nicht exakt aufgesetzt:
Delphi-Quellcode:
procedure TFormMain.RunBenchmark(ClassName: string; RowIndex: Integer);
var
Hash : TDECHash;
HashResult : TBytes;
i : Integer;
begin
Hash := TDECHash.ClassByName(ClassName).Create;
try
FStopwatch.Reset;
FStopwatch.Start;
for i := 0 to cIterations - 1 do
begin
HashResult := Hash.CalcBytes(FBenchmarkBuffer);
end;
FStopwatch.Stop;
sg_Results.Cells[1, RowIndex] :=
Format('%0:f', [cIterations / (FStopwatch.ElapsedMilliseconds/1000)]);
sg_Results.Cells[2, RowIndex] := FStopwatch.Elapsed; //.ToString;
finally
Hash.Free;
end;
end;