OMG text processing performance 6.7 - 9.5
Richard Gaskin
ambassador at fourthworld.com
Sat Feb 1 03:17:50 EST 2020
Ralph DiMola wrote:
> I found this as well. Another thing, it's faster to truncate the string and
> search from the beginning than using a "start at" on the entire string when
> searching for all occurrences of a string . This was counter intuitive to me
> until Mark explained that skipping chars requires more work because
> repetitive skipping of Unicode chars is slower than many "memcpy"s on very
> long strings.
Very interesting - thanks for noting that. It's counterintuitive, but
it sure shows:
I ran a quick test searching for all offsets for the string "Spitz" in
the Gutenberg text file for Jack London's "Call of the Wild" - here are
the results:
377 ms for 'start at'
56 ms for deletion
--
Richard Gaskin
Fourth World Systems
More information about the use-livecode
mailing list