Hi, > I was able to isolate the problem. > The following script shows almost the same time as testindex.r > searching for 200000 objects. > > > n: 200000 > h: make hash! n > start: now/time/precise > repeat i n [ > oid: random n > obj: select h oid > if none? obj [ > obj: make object! [__oid__: oid] > insert insert tail h oid obj > ] > if (i // 100) = 0 [clear h] > ] > > print ["Elapsed time for adding" n "records" (now/time/precise - start)]
1) For what i understand, you allocate a 200.000 slot hash, then clear the cache every 100 item. Why? 2) The last thing: time consuming task here is clear. 3) Another thing: if you make hash! n then you should insert n item not n * 2 (with insert insert) Remember that Rebol uses internal and hidden keys to hash. Your oid value is internally hashed like any other value. --- Ciao Romano -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.