.
D 2008-06-10T23:10:41
J assignee msofer
J cmimetype text/plain
J comment I'm\stesting\sout\sadding\sa\sstate\soption\sto\sthe\sbinary\sencode\sfunctions\sto\smake\sit\ssimpler\sto\swrite\schannels\sthat\suse\sthese\sfunctions.\sThe\s-state\soption\stakes\sa\svariable\sname.\sIn\sthe\sC\scode\swe\stherefore\sget\sa\sbytearray\sobject\spassed\sin\svia\sthe\sobjv\sarray\sand\smay\salso\sget\sanother\sobject\spassed\svia\sname.\nI\sget\sa\s10x\sfaster\scalling\stime\susing\sthe\spass-by-name.\n\n%\sproc\st1\s{}\s{variable\sdata;\sbinary\sencode\shex\s$data}\n%\sproc\st2\s{}\s{variable\sdata;\sbinary\sencode\shex\s-state\sdata\s""}\n%\sset\sdata\s[binary\sformat\s@102400]\s;\sstring\slength\s[t1]\n204800\n%\sset\sdata\s[binary\sformat\s@102400]\s;\sstring\slength\s[t2]\n204800\n%\sset\sdata\s[binary\sformat\s@102400]\s;\stime\s{t1}\s10\n1755.9\smicroseconds\sper\siteration\n%\sset\sdata\s[binary\sformat\s@102400]\s;\stime\s{t2}\s10\n218.6\smicroseconds\sper\siteration\n\n!!!!!\n\nThe\sC\sfunction\saccesses\sthese\sTcl_Obj's\susing:\n\s\s\s\sdata\s=\sinput\s=\sTcl_GetByteArrayFromObj(objv[objc-1],\s&count);\n\s\s\s\sif\s(stateObj)\s{\ndata\s=\sstate\s=\sTcl_GetByteArrayFromObj(stateObj,\s&state_count);\ncount\s+=\sstate_count;\n\s\s\s\s}\nand\sthen\sI\smove\sthe\s'data'\spointer\salong\sthe\sstate\sdata\sfirst\sthen\sthe\sinput\sdata.\sSo\sthe\sC\scode\sis\sidentical\sfor\seach\scalling\smethod.\n\nYou\scan\ssee\sthe\sfull\sfunction\sat\shttp://paste.tclers.tk/973\n\n\n
J foundin obsolete:\s8.6a0
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter patthoyts
J subsystem 07.\sVariables
J title Surprising\sdifferences\sin\svariable\saccess\sspeed.
J type Bug
K 1990276fffffffffffffffffffffffffffffffff
U patthoyts
Z f2ca432aeffce38b8fb39587e6ce093c