CnPack Forum

#1 关于CnHashmap和CnHashTable性能问题？
我用TCnStrToPtrHashMap和TCnHashTableBig测试了一下，代码如下：
var
time,i:Cardinal;
hash:TCnStrToPtrHashMap;
begin
hash := TCnStrToPtrHashMap.Create();
time := GetTickCount;
for i := 0 to 9000000 do
begin
hash.Add(IntToStr(i),TObject(i));
end;
btn1.Caption := IntToStr(GetTickCount - time);

var
time,i:Cardinal;
hash:TCnHashTableBig;
begin
hash := TCnHashTableBig.Create(9000000 ); //如果我这个初始化9000000 就提示内存超出， ..

#1 >>Next Page

Forum:CnVCL 组件包
Thread:关于CnHashmap和CnHas ...
Next Thread:CnPack 是安全免费的 ...

Home
Login

Powered by Discuz!