Scripting a text to binary digits converter
Jim Ault
jimaultwins at yahoo.com
Mon Jan 2 17:05:31 EST 2012
On Jan 2, 2012, at 4:25 PM, Bryan McCormick wrote:
> Jim,
>
> Thanks so much. I wonder how much faster that is? And Guglielmo, I appreciate you taking a crack at this. I don't get how to do the encode using your approach at all since I am not familiar with the params for the BinaryEncode function.
>
You could do your own bench-marking by
---------------------
put "135898" into varText
put 100 * 1000 into loopCnt
repeat loopCnt times
put varText & cr after veryLongList
end repeat
put the ticks into startTicks
repeat for each line LNN in veryLongList
put convertTextToBinary(varText) into tConverted
end repeat
put the ticks - startTicks into elapsedTicks
put elapsedTicks div 60 into elapsedSeconds
get elapsedTicks && " tick count"
get IT & cr & elapsedSeconds && " tick count"
get IT & cr & loopCnt/elapsedTicks && " conversions per tick"
put IT into msg
------------------------
Jim Ault
More information about the use-livecode
mailing list