>I added this to your routine: As usual, Colin is a stud.
Ok, if you want studly performance, I tried a different approach:
on chunky chunk
m = the milliseconds
thetext = member("test string").text
c = the number of chars in thetext
chunkcount = c/chunk
thelist = []
repeat with a = 0 to chunkcount
thesechars = char a*chunk to (a+1)*chunk of thetext
repeat with b = 1 to chunk
append thelist,chartonum(char b of thesechars)
end repeat
end repeat
howlong = the milliseconds - m
put "Char count:" & c & return & "How long:" & howlong
endYou can call this by putting this in the message window:
chunky n
where n is an integer that you can vary to see where the sweet spot is. I already have timings, but I'll leave you to amaze yourself.
Here's a tester version that you can give a range of chunk sizes to:
on chunkytest n1,n2
bestyet = the maxinteger
bestn = 0
repeat with chunk = n1 to n2
m = the milliseconds
thetext = member("test string").text
c = the number of chars in thetext
chunkcount = c/chunk
thelist = []
repeat with a = 0 to chunkcount
thesechars = char a*chunk to (a+1)*chunk of thetext
repeat with b = 1 to chunk
append thelist,chartonum(char b of thesechars)
end repeat
end repeat
howlong = the milliseconds - m
if howlong < bestyet then
bestyet = howlong
bestn = chunk
end if
end repeat
put "Sweet Spot:" & bestn & return & "How Long:" & bestyet
end[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
