On Feb 4, 2009, at 6:45 PM, Chipp Walters wrote:
Interesting note: I found the following results:
function altAsciiScrub2 pText
put replacetext(pText,"[" & numToChar(129) & "-" & numToChar(255) &
"]","") into pText
put replacetext(pText,"[" & numToChar(1) & "-" & numToChar(31) &
"]","")
into pText
return pText
end altAsciiScrub2
executed in 19 ticks on my QuadCore Vista 64 machine
function altAsciiScrub1 pText
repeat for each char c in pText
get charToNum(c)
if it > 128 or it < 32 then
next repeat
end if
put c after t
end repeat
return t
end altAsciiScrub1
executed in 17 ticks on my QuadCore Vista 64 machine
repeat for each is really fast.
That said, executing one replaceText versus a single "if it >128
(Devin, yours was much slower: 49 ticks)
Wow! What a testimonial to the speed of repeat for each. I have to
think that the text you're "scrubbing" is longer than 128 chars.
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution