T
TENTODBV
Unregistered / Unconfirmed
GUEST, unregistred user!
能否跳过SL:TStringList,在生成每行字符串时就写入某个Buffer,最后整块存储。
procedure TForm1.Button1Click(Sender: TObject);
var
i,T:integer;
SL:TStringList;
begin
T:=GetTickCount;
SL:=TStringList.Create;
for i:=0 to 1000000 do
begin
SL.Add(Format('%.15d',));
end;
SL.SaveToFile('c:/temp/test.txt');
Form1.Caption:='写入完成'+FloatToStr((GetTickCount-T)/1000)+'秒';
end;
procedure TForm1.Button1Click(Sender: TObject);
var
i,T:integer;
SL:TStringList;
begin
T:=GetTickCount;
SL:=TStringList.Create;
for i:=0 to 1000000 do
begin
SL.Add(Format('%.15d',));
end;
SL.SaveToFile('c:/temp/test.txt');
Form1.Caption:='写入完成'+FloatToStr((GetTickCount-T)/1000)+'秒';
end;