On Monday, July 26, 2004, at 04:02 AM, Jay Reeve wrote: > On Monday, July 26, 2004, at 01:57 AM, Larry Siebenmann wrote: >> --- (maybe) a FB flag that indicates that >> the array has been changed since the last pointer array build. >> If this flag is zero, then the lookup related functions >> should use the pointer array. The build mentioned >> could reasonably zero this flag. > I can work on an override to do this--but not tonight. Larry, I have some exciting news for you. Your proposal sparked a compromise solution, using a pointer list but with just one pointer for every 16 handles. Much easier and faster to maintain while still giving most of the benefits of the pointers. My tests show my new approach ranges from marginally slower to outrageously faster for the various INDEX$ functions. You'll be pleased to hear that reading 10,000 strings from the array dropped from 1.570 seconds to 0.006 seconds!!! Here's the whole results table. Times are in seconds. 1. Initialize INDEX$(0) to 200000 bytes. Mine = 0.000 FB = 0.000 2. Insert a short string at the beginning of the array 10,000 times: Mine = 2.342 FB = 0.403 --Worst case for mine : ( 3. Replace each of the 10,000 short strings with a longer one. Mine = 0.672 FB = 2.516 4. Search every 10th string for a word it contains. Mine = 0.047 FB = 0.055 5. Search for an unfindable string, starting with each of the 10,000 strings. 6. Insert a string before each of the 10,000 strings, deleting the top one each time. Mine = 6.001 FB = 4.815 7. Read each of the 10,000 strings into a variable. Mine = 0.005 FB = 1.153 --! 8. Read the 10,000th string into a variable 10,000 times. Mine = 0.005 FB = 2.612 --!!!!!!!!!!!!!! 9. Delete the first string in the array 10,000 times (forcing all the others to move down): Mine = 0.612 FB = 0.371 I'll send you my Subs Index.incl back channel, along with my test routine. (Also to anyone else who requests.) Run the test routine and record your results for the standard FB incl. (Click on the first column head in the profiler to see them in order.) Then drop my incl into your User Libraries folder and run the routine again. This still needs thorough testing. It appears to be working correctly, but there could be major bugs yet. If you have a program that makes use of INDEX$ strings, please run it with this and watch for any anomalies. Any opinions on submitting this as a permanent replacement in R2? e-e =J= a y " -- To unsubscribe, send ANY message to: futurebasic-unsubscribe@...