[REBOL] Re: newlines
From: lmecir:mbox:vol:cz at: 13-Nov-2001 18:18
Hi Joel, Volker & all,
I would like to comment the speed of the INS1 algorithm:
out: clear ""
parse/all s [
start: thru "..." end1: any "." (
insert/part tail out start back end1
insert tail out start
The way the algorithm is designed gives it an unfair advantage when it is
timed in a loop where it is executed more than once. To receive a fair value
for one pass, we would have to modify the first line as follows:
out: copy ""
Then the algorithm would be slower than its preallocated variant, which is:
out: make string! length? s
Even the preallocated variant is slower than the "artificial" variant used
if the speed is measured executing the code in a loop as described.
That is why I think, that the results for this algorithm are "less valid"
than the results of other algorithms in this arrangement.