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

[REBOL] How to make fast timestamped dictionaries ?

From: jasonic::cunliffe::verizon::net at: 2-Jan-2002 12:13

Apologies as I'm sure this has been covered already somewhere.. I need a timestamped dictionary:
>> dict: make hash! 1024
== make hash! []
>> insert tail dict [now/precise "making dictionaries is what we do"]
== make hash! []
>> insert tail dict [now/precise "Life is only good when well written"]
== make hash! []
>> dict
== make hash! [now/precise "making dictionaries is what we do" now/precise Life is only good when well written ] Q1: How do I get now/precise to be valuated at the same time I do the insert? ie returns 2-Jan-2002/11:48:00.00-5:00 "making dictionaries is what we do" 2-Jan-2002/11:51:49.84-5:00 "Life is only good when well written" Q2: What do you suggest would most efficient REBOL structure for timestamped key lookups when there is large amount of data? Is hash! the fastest way to go? Should entries be paired up in sub-blocks: [timestamp data][timestamp data][timestamp data]..? Q3: If my entries are not text/data strings but REBOL words, functions etc, what methods do you suggest to eroor test and evaluate them, need to acess them in a foreach loop or find timestamp? thanks ./Jason