Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Profiling Rebol API to DyBASE

From: dockimbel:free at: 19-Dec-2003 10:58

Hi Konstantin, Here's a version executing 10 times faster. I just changed h series type from hash! to list!. Looks like in your case, cost for adding data is much higher than for searching keys... Regards, -DocKimbel n: 200000 h: make list! n l: make block! n start: now/time/precise repeat i n [ oid: random n pos: find h oid either pos [ obj: pick l index? pos ][ obj: make object! [__oid__: oid] insert tail h oid insert tail l obj ] if zero? i // 100 [clear h clear l] ] print ["Elapsed time for adding" n "records" (now/time/precise - start)] Selon Konstantin Knizhnik <[knizhnik--garret--ru]>: