Skip to content
Tcl Source Code Artifact [06c922aa89]
Login

Artifact [06c922aa89]

Artifact 06c922aa89edaf1c22b6d10aa27dd0b2e0032f42:

Ticket change [06c922aa89] - Open ticket [1465666fffffffff|1465666fff]: <i>8.5 lists sometimes uses more memory for 8.4..</i> plus 4 other changes by afredd on 2006-06-21 21:50:16.
D 2006-06-21T21:50:16
J icomment Logged\sIn:\sYES\s\nuser_id=1386588\n\n>Can\syou\sverify\sthat\sthe\sresults\sof\s[parray\stcl_platform]\n>are\sthe\ssame\sbetween\syour\s8.4\sand\s8.5\sbuilds?\n\nBoth\sgive:\n%\sparray\stcl_platform\ntcl_platform(byteOrder)\s=\slittleEndian\ntcl_platform(machine)\s\s\s=\sintel\ntcl_platform(os)\s\s\s\s\s\s\s\s=\sWindows\sNT\ntcl_platform(osVersion)\s=\s5.1\ntcl_platform(platform)\s\s=\swindows\ntcl_platform(user)\s\s\s\s\s\s=\safredd\ntcl_platform(wordSize)\s\s=\s4\n%\n\nThe\s8.4.8\sis\sa\sa\sActiveState\sbuild.\sThe\s8.5a3\sis\sa\nhome\sbuilt\sversion\susing\sVS6.\sJust\sreran\sthe\stest\nand\sget\sthe\soriginal\sreported\smemory\susage\sresults.\n\nHowever,\swith\sa\shome\sbuilt\s8.4.6\s(don't\shave\s8.4.8\sto\shand)\nthen\sthis\smatches\smy\s8.5a3.\sSo\sthe\sdifference\smay\sbe\sdue\nto\sthe\smemory\sallocator\sused\sby\sthe\sAS\sbuild.\sDoes\sthis\nsound\spossible?\n\n--\n\nOn\sa\snot\squite\stangent...\nMy\soriginal\sreport\scame\sfrom\strying\sto\swork\sout\swhy\ni\swas\sseeing\stiming\sdifferences\sin\s[lsort\s-real...]\nwhere\sthe\slist\swas\sof\sstrings\sof\s"$i.".\nI\sthought\sit\smight\sbe\sdue\sto\ssome\skind\sof\smemory\soverhead,\nhence\sthe\sreport.\sBut\sthis\swas\sprobably\sa\sred\sherring.\n\nBeen\sawhile\ssince\si've\slooked\sinto\sthis,\sbut\shere's\sa\nscript\syou\scan\stry\son\s8.4\sand\s8.5\sto\ssee\swhat\si\sfound:\n\nproc\smain\s{}\s{\nputs\s"Tcl\s[info\spatch]"\nset\smax\s1000\nfor\s{set\sj\s1024}\s{1}\s{set\sj\s[expr\s{4\s*\s$j}]}\s{\nset\slst\s{}\nfor\s{set\si\s0}\s{$i\s<\s$j}\s{incr\si}\s{\nlappend\slst\s$i.\s;#\s$i.$i\s;#\s+$i\s-$i\s\n0\s.$i\n}\nset\sN\s[llength\s$lst]\nif\s{$N\s>\s500000}\sbreak\n\nset\sM\s[expr\s{2\s+\sint(8000000.0\s/\s((log($N))\s\n*\s$N))}]\nif\s{$M\s>\s$max}\s{\sset\sM\s$max\s}\s;#\sthat's\s\nplenty!\n\nlsort\s-real\s$lst\s;#\sflush\stiming\nputs\s"$N\\t\s($M)\\t\s[lindex\s[time\s{lsort\s-\nreal\s$lst}\s$M]\s0]"\n}\n}\n\nmain\n\n#\s>%\n\nAnd\smy\sresults:\n\nTcl\s8.5a3\n1024\s\s\s\s\s(1000)\s\s567.529\n4096\s\s\s\s\s(236)\s\s\s2700.5381355932204\n16384\s\s\s\s(52)\s\s\s\s12117.807692307691\n65536\s\s\s\s(13)\s\s\s\s57660.46153846154\n262144\s\s\s(4)\s\s\s\s\s262260.5\n\nTcl\s8.4.6\n1024\s\s\s\s\s(1000)\s\s286\n4096\s\s\s\s\s(236)\s\s\s1425\n16384\s\s\s\s(52)\s\s\s\s6315\n65536\s\s\s\s(13)\s\s\s\s30047\n262144\s\s\s(4)\s\s\s\s\s132042\n\nie.\s8.5\sis\ssignificantly\sslower.\nThe\sseemingly\sobvious\scandidate\sis\s8.5's\snew\sreal\snumber\nparsing\scode...\sbut\swhen\si\slooked\sinto\sthis\sclosely\si\s\ncouldn't\sshow\sthis\sto\sbe\sthe\scase.\n\nCan\syou\sreplicate\smy\stiming\sdifferences?\n\n\n\n\n\n
J login afredd
J mimetype text/plain
J status Open
J username afredd
K 1465666fffffffffffffffffffffffffffffffff
U afredd
Z 8180cf37e9bfa34433f69d43526b2e04