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

Best Rebol DataStructures

 [1/3] from: info::id-net::ch at: 4-Jan-1980 4:08


Hello List. What is the Best Rebol DataStructure to access, select and insert.. Different simples structures can be found by different rebol application found on the net.. 1 ) a file with rebol header: + [ [item1 "hello" item2 "world"] [item1 "bonjour" item2 "le monde"] ] 2) [ [1 [[item1 "hello" item2 "world"] 2 [item1 "bonjour" item2 "le monde"] ] 3) etc... In this domain, could be the Doc Kimble mySql code better (fast and easier) to make selection, access, etc.. I ask this question because I also want to know if using protocols could slow the acces to the DB.. Philippe

 [2/3] from: joel:neely:fedex at: 1-Feb-2003 9:32


Hi, Philippe, IMHO, "best" is relative to specific needs (as is "efficient")... Philippe Oehler wrote:
> What is the Best Rebol DataStructure to access, select and insert.. >
Linked structure (e.g. LIST!) are normally constant time to insert or delete, but linear on positional access or modification. OTOH, fixed position structures (e.g. BLOCK! or STRING!) are normally linear time to insert or delete, but constant time to access or modify. Both are normally linear time to search (FIND or SELECT). The mix of activity (ratio of insert/delete vs. retrieve and change) will influence which provides overall faster operation, and that tends to be application specific. To illustrate this point in a larger setting, that's why databases tend to be tuned/designed quite differently for "data warehouse" uses than for "transactional" uses. -jn-

 [3/3] from: info::id-net::ch at: 4-Jan-1980 9:21


What is the algorithm behind FIND and SELECT... all the DB is researched (then break) or is it a dichotomic selection (first a sort then a division of the DB by 2 until find the element) ???