[REBOL] Re: Newbie Q: Search and delete from a Block
From: rotenca:telvia:it at: 10-Oct-2002 16:34
> RPT> if all [any-string? target any [not any-string? :search tag?
> RPT> [search: form :search]
Rethinking to this, now It seems to me that this expression is unuseful in the
parse version, it is used in the RT version only to calculate the string
length of search (in the following missing line).
But using a formed 'search should speed up things with many matched cases,
else the parse rule must form the search value at any iteration.
BTW, that tag? is interesting for me: formed tag string are an exception in
the any-string group.
>BTW, for a long string copying to a new string will probably be
>faster than changing the original (unless you're not moving data
>around at all, i.e. when SEARCH has the same length as
now i have made tests with long strings (> 10000 chars) and many matched
searches and i do not see so any differences between while and parse. I think
that all the time, in such cases, is consumed by the change/part command.
Perhaps one could add to replace a /copy refinement.