Skip to content
Tcl Source Code Artifact [528dc7d70e]
Login

Artifact [528dc7d70e]

Artifact 528dc7d70efda8c9cb459cb5e9c1a02e9373f10e3964079044f40efe072464fd:

Ticket change [528dc7d70e] - Ticket [a4a7f2abd376b280|a4a7f2abd3] <i>Tcl [string match] and [glob] are exponential complexity for bad patterns, could be linear</i> status still Open with 4 other changes by serhiy.storchaka on 2026-10-19 17:25:25.
D 2026-10-19T17:25:25.548
J foundin 8.6.18,\s9.0.5,\s9.1.0
J icomment Still\sexponential\sin\s8.6,\s9.0\sand\s9.1:\swith\s<tt><nowiki>string\smatch\s[string\srepeat\sa*\s30]b\s[string\srepeat\sa\s30]</nowiki></tt>\seach\sfailed\s<tt>*</tt>\sretries\severy\ssuffix,\salthough\snothing\safter\san\sexhausted\sstring\scan\smatch.\n\nProposed\sfix\sin\sbranch\s[/timeline?r=glob-match-linear|glob-match-linear]:\sa\ssmaller\schange\sthan\sthe\srewrite\sin\s[/timeline?r=aspect-string-match|aspect-string-match],\sin\sall\sfour\smatchers\s(string,\sbyte\sarray\sand\sboth\sUnicode\sones).\sAs\sin\swildmat,\sa\smatch\sthat\sfails\sbecause\sthe\sstring\sran\sout\sstops\sthe\souter\s<tt>*</tt>\sfrom\sretrying.\sThe\scase\sabove\snow\stakes\s1\sµs;\s20000\srandom\spatterns\sgive\sthe\ssame\sresults\sas\sbefore.\sTest\sstring-11.56.\sThe\sedge\scases\sof\smalformed\spatterns\slisted\shere\sare\snot\schanged.
J login serhiy.storchaka
J mimetype text/x-fossil-wiki
K a4a7f2abd376b2806073d2865f07b7d910b04574
U serhiy.storchaka
Z 29b546c55ed063e623249ccc3b87446e