.
D 2010-04-28T20:10:57
J icomment >\sUse\s[binary\sformat\sa130\s\\0]\sto\sget\sthat.\n\nDonal\s-\sthanks.\s\sAs\syou\smay\shave\sguessed,\sI\sdon't\sdo\smuch\swork\swith\sbinary\sdata...\s;^)\n\n>\sLet's\ssee\swhat\syou\sget\sin\sterms\sof\stimings\swith\s[binary\sformat]\sinstead\sof\n[string\srepeat]\n\nAlex,\n\nHere's\smy\smodified\sproc\susing\s[binary\sformat]...\n\nproc\sap\s{}\s{\n\s\s\s\sglobal\ssample\n\s\s\s\sset\sz\s[binary\sformat\sa130\s\\0]\n\s\s\s\sfor\s{set\si\s0}\s{$i<10000}\s{incr\si}\s{\n\s\s\s\s\s\s\s\sforeach\sl\s$sample\s{\n\s\s\s\s\s\s\s\s\s\s\s\sappend\sbuffer\s[string\srange\s$z\s0\s$l]\n\s\s\s\s\s\s\s\s}\n\s\s\s\s}\n\s\s\s\sputs\s"Total\ssize:\s[string\slength\s$buffer]"\n}\n\nNote\sthat\sI\schanged\sthe\soriginal\s100000\sto\s10000.\s\sUsing\sthe\soriginal\svalue,\s8.5\s(fairly\squickly)\sgenerates\sa\sfatal\s"unable\sto\srealloc\s485000018\sbytes"\smessage.\sWhile\s8.6b1.1\sdidn't\scrash,\sit\salso\snever\scompleted\sin\sthe\s20\smins\sI\slet\sit\srun.\n\nReducing\sthe\svalue\sto\s10000,\sboth\scomplete\sand\sI\ssee\sspeed\sdifferences\sin\sthe\sballpark\sof\swhat\sI\soriginally\sreported\s(actually,\sworse).\n\nTotal\ssize:\s24250000\n1071639\smicroseconds\sper\siteration\n(Temp)\s1\s%\sset\stk_patchLevel\n8.5.8\n\nTotal\ssize:\s24250000\n42250394\smicroseconds\sper\siteration\n(Temp)\s1\s%\sset\stk_patchLevel\n8.6b1.1\n\nSo,\snearly\sa\s40x\sdifference.\n\n\n\n\n\n
J login jgodfrey
J mimetype text/plain
J username jgodfrey
K 2992970fffffffffffffffffffffffffffffffff
U jgodfrey
Z 720e17a31e733a2ec495dcd500ea4712