.
D 2001-09-04T12:02:38
J assignee msofer
J cmimetype text/plain
J comment (see\salso\nhttp://groups.google.com/groups?hl=en&safe=off&threadm=3B9458E6.93CEF15F%40ActiveState.com&prev=/groups%3Foi%3Ddjq%26as_ugroup%3Dcomp.lang.tcl)\n\nThe\soutput\sof\n\s\s\s\sproc\stestproc\s{args}\s{set\sx\s1}\n\s\s\s\sproc\stest0\s{}\s{puts\s"proc\stest0:\s\s[time\s{testproc}\n100000]"}\n\s\s\s\sproc\stest1\s{}\s{puts\s"proc\stest1:\s\s[time\s{testproc\s}\n100000]"}\n\s\s\s\sproc\stest2\s{}\s{eval\s{puts\s"proc\stest2:\s\s[time\n{testproc}\s100000]"}}\n\n\s\s\s\sputs\s"top\slevel:\s[time\s{testproc\s}\s100000]"\n\s\s\s\stest0\n\s\s\s\stest1\n\s\s\s\stest2\nis\n\s\s\s\s[mig@mini\sunix]$\stclsh\stest2\n\s\s\s\stop\slevel:\s4\smicroseconds\sper\siteration\n\s\s\s\sproc\stest0:\s\s20\smicroseconds\sper\siteration\n\s\s\s\sproc\stest1:\s\s4\smicroseconds\sper\siteration\n\s\s\s\sproc\stest2:\s\s4\smicroseconds\sper\siteration\n\nI\sthink\sthat\sthe\sproblem\sin\stest0\sis\scaused\sby\nshimmering\sof\sthe\sliteral\n"testproc":\n\s\s-\sit\sis\sconverted\sto\stclByteCodeType\sby\sTcl_EvalObjEx\n\s\s-\sit\sis\sconverted\sto\stclCommandNameType\sby\nTcl_ExecuteByteCode\n\nSo,\sthe\sdifference\swould\sbe:\n\s\s\s-\sin\stest0,\s"testproc"\sis\sparsed,\scompiled\sand\nlooked\sup\sas\sa\s\n\s\s\s\s\scommand\srepeatedly\n\s\s\s-\sat\stop-level\sand\sin\stest2,\s"testproc"\snever\nbecomes\sa\s\n\s\s\s\s\stclByteCodeType\s\n\s\s\s-\sin\stest1,\sthere\sare\stwo\sdifferent\sliterals:\n"testproc\s"\sis\salways\s\n\s\s\s\s\stclByteCodeType,\s"testproc"\sis\salways\ntclCommandNameType\n\nThis\swould\sexplain\swhy\sthe\sdifference\sonly\soccurs\sat\ncalls\swith\sno\narguments.\n\n
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter msofer
J subsystem 47.\sBytecode\sCompiler
J title slow\scalls\sof\scmds\swith\sno\sarguments
J type Bug
K 458361ffffffffffffffffffffffffffffffffff
U msofer
Z 4481c83d43e8121ad7dab7b1a0e6be3d