I have a record of arrays where i search and add new items and want to speed up things. removing ansicompare was a big step forward bit as much the count of records gets mor as slower the array gets. Thanks for any hints.
I have a record of arrays where i search and add new items and want to speed up things. removing ansicompare was a big step forward bit as much the count of records gets mor as slower the array gets. Thanks for any hints. type __params = record vname:string; vvalue:variant; vdescription:string; end; c__params = tArray ; // I'm searching within the c__params array as follows: function __tc_find(vData:c__params; vName:string):integer; var vmax, i:integer; begin result:=-1; vname:=trim(lowercase(vname)); if vData nil then begin vmax:=length(vData)-1; for i:=0 to vmax do begin // if ansisametext(vData[i].vname, vname) then begin ** very slow ** if (vData[i].vname=vname) then begin result:=i; break; end; end; end; end; // and i'm adding new values with this procedure __tc_add(var vparams:c__params; const vname:string; const vwert:variant; const vdescription:string=...