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

[REBOL] Re: newlines

From: lmecir:mbox:vol:cz at: 15-Nov-2001 8:13

Hi Brett, I declared B so, that no garbage collection occurred in this case, (see the 1'000 in MAKE STRING!) or in any case where not more than 1'000 elements are changed. That is why I declared it outside of CP. To measure the time I used my TIME-BLOCK function (can be found at my site under benchmarks). It seems that (strangely) the speed of CHANGE/PART depends on the total size of SAMPLE only. My guess is, that similar results can be obtained using blocks too. Cheers Ladislav << The CP function code being far faster than the CHANGE native function is interesting. Was having B declared outside of CP crucial or was it just to avoid a potential unfair function overhead on CP? Both seem very quick. How did you measure the difference in speed? As you increase the size of the sample string or change the reference points to change/copy, is there changes in the results? What of blocks instead of strings? Brett.