Code: Select all
static function randomtest()
local nSeconds := Seconds()
local n, aTest[0], MAX_LOOP := 3000000
local pHt := _HDICT_NEW(,MAX_LOOP)
for n := 1 to MAX_LOOP
_HDICT_SETPROP(pHt,cBin2Hex(cGenRndStr(8,.T.)), 0)
// cBin2Hex() is needed here as the hash table is case insensitive
next
aadd(aTest,{" Elapsed Time: %i Seconds " , Seconds() - nSeconds})
aadd(aTest,{" %i Items %i Duplicates",MAX_LOOP , MAX_LOOP - _HDICT_COUNT(pHt)} )
DC_Arrayview(aTest)
return NIL
Joe