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

[REBOL] Re: Another newbie problem

From: greggirwin:mindspring at: 2-Feb-2005 22:58

Hi Izzy, I> Can it be optimized more? There ain't no such thing as the fastest code. :) (any Michael Abrash readers out there; old DDJ optimization challenges were so much fun!) The more we know about the data, constraints, etc. the more we can help. e.g. will the data all fit in memory? What is the approximate percentage of duplicates? Are all values the same length? How many unique values can be expected? Think about this, FIND just does a linear search, so if you have a large data set, and the match is at the end, or not there at all, how will that affect you? The more times you call find, and the larger your data set, the worse it's going to get, right? What about using a hash! for lookups or a BTree? What about sorting the data (that would group the duplicates, right?)? Profiling is important in optimizing, because otherwise you don't know what to optimize. The same applies to information about the problem. :) -- Gregg