SC, Rev,and RB speed test
Dar Scott
dsc at swcp.com
Thu Apr 15 04:22:52 EDT 2004
Wednesday, Chris wrote,
> The projects match 3,000 short phrases against an 81,920 word text.
> Revolution -- 1120 ticks
That's about 19 seconds.
I would guess the text about 500,000 characters. A brute force
comparison would then be doing over 3,000 X 500,000 character
comparisons, depending on the number of false starts. That's about 12
ns per character.
On my computer I get about 12 ns per character in the 'contains'
operation.
Perhaps this test is really a test of 'contains' or offset() against
the RealBasic instrb(). This is good to know, but it might be a narrow
comparison.
I wouldn't wouldn't search for phrases this way, but I understand it is
just a speed test.
Dar Scott
More information about the use-livecode
mailing list