.
D 2002-10-18T22:41:45
J assignee nobody
J cmimetype text/plain
J comment I've\sdetected\san\serror\sin\sthe\scompilation\sof\sthe\nregexp\scommand.\n\nPut\sthe\sfollowing\scode\sinto\sa\sfile\scalled\ntstRegexp.tcl:\n\n<code>\nproc\sisblank\s{word}\s{\n\s\s\sif\s{[regexp\s{^[\s]*$}\s$word]}\s{\n\s\s\s\s\s\sputs\s"is\sblank"\n\s\s\s}\selse\s{\n\s\s\s\s\s\sputs\s"is\snot\sblank"\n\s\s\s}\n\n#...some\sunnecessary\slines\n\s\s\s.\n\s\s\s.\s<Repeat\sthis\sline\s1000\stimes!>\n\s\s\s.\n#...some\sunnecessary\slines\n\n}\n\nputs\s[time\s[list\sisblank\s"Hello"]]\n</code>\n\nIt's\s*very*\simportant\sto\srepeat\sthe\ncomment\sline!!\n\nOn\smy\sold\s400Mhz\sAMD\swith\sWinME\sand\nthe\snew\sActiveTcl4.0.1\sdistribution,\nthe\soutput\sof\s"tclsh84\ststRegexp.tcl"\sis:\n\nis\snot\sblank\n94107834\smicroseconds\sper\siteration\n\nOver\s90\sseconds\sis\sa\svery\slong\stime,\nfor\ssuch\sa\ssimple\sscript!\n\nWith\sthe\solder\sTcl8.3.4\sthe\soutput\svaries\nbetween\s0\sand\s60000\smicroseconds.\n\nI've\slooked\sa\slittle\sbit\sdeeper\sinto\nit,\sand\sdetected\sthat\smost\sof\sthe\stime\sis\nwasted\sin\sTclCompileRegexpCmd.\sA\slittle\nbit\sdeeper\sin\sthe\scalling\stree\sit\sdoes\nmany\srecursive\scalls\sto\sduptraverse.\nThe\sproblem\sseems\sto\sbe,\sthat\sthe\s\nstring\sfor\sthe\sregexp\scompilation\sis\nthe\swhole\srest\sof\sthe\sproc\s(including\nthe\smany\scomments).\sI\sthink\sthere\sis\nan\serror\sin\sdetecting\sthe\send\sof\s\nthe\sregexp\sstring?!\n\n
J foundin obsolete:\s8.4.0
J priority 5\sMedium
J resolution None
J status Open
J submitter schmitzu
J subsystem 43.\sRegexp
J title Error\sin\scompiling\sregexp
J type Bug
K 625441ffffffffffffffffffffffffffffffffff
U schmitzu
Z 9a8537e5cb5026dddb2b311510a9769e