<i>performance regression for $a[unset a] pattern</i> status still Closed with 5 other changes
by
.
D 2017-06-01T16:30:14.473
J closedate 2457906.18766751
J closer dgp
J icomment Agree\sthat\swas\sinadequate.\sI\shad\sonly\sa\sfleeting\smoment,\r\nbut\sI\swanted\sto\sat\sleast\srecord\sdissent\sbefore\sthe\strain\r\ngot\stoo\smany\smiles\saway\sfrom\sthe\sstation.\r\n\r\nThe\sdgp-string-cat\sbranch\swas\sone\sof\sseveral\sefforts\sto\r\nroute\sstring\soperations\sthrough\sa\ssingle\simplementation\r\nwhere\sbefore\sthere\shad\sbeen\smultiple\sduplicate\simplementations,\r\neach\swith\sits\sown\squirky\sset\sof\sbugs\sor\sinefficiencies.\r\nThere\sare\sseveral\smore\sthat\sstill\sneed\sdoing.\s(StringMatch\s!)\r\n\r\nTcl\sstrings\sare\sunexpectedly\scomplex\sbeasts\swith\sat\sleast\r\n3\sintreps\sto\sdeal\swith.\s\sIt's\sreally\sa\smuch\sbetter\sidea\sto\r\nimplement\seach\sstring\soperation\sonly\sonce\sand\sget\sit\sright.\r\nThis\salso\spaves\sthe\sway\sto\sexplore\swholesale\sreplacement\sof\r\nthe\scurrent\scomplex\sbeast\swith\ssome\sother\sones,\swithout\sthe\r\nneed\sto\sgrep\sthrough\sthe\swhole\scodebase\sseeking\sall\sN\r\nimplementations\sof\sstring\sconcatenation.\r\n\r\nAttaching\ssome\soptimizations\sto\sjust\sone\scaller\sof\r\nTclStringCatObjv()\slooks\slike\sthe\sfirst\sstep\sin\r\nreversing\sthat\srefactoring\scourse,\sso\sI\sreacted\sin\sprotest.\r\n\r\nI\salso\sprotest\sthe\sexpectation\sthat\sin\sa\sbranch\sdedicated\r\nto\salpha\sexplorations,\swe\shave\sto\sremain\sslaves\sto\sthe\r\nabsolute\sbest\sperformance.\s\sThat's\sa\srecipe\sfor\ssticking\r\nin\slocal\soptima\sof\simplementation\sand\smissing\sthe\schance\r\nto\sincrementally\smove\sto\sradically\sbetter\sapproaches.\r\n\r\nI've\shad\ssimilar\sobjections\sto\sother\sperformance-chasing\r\non\strunk\sbased\son\sthings\slike\sTcl_ObjType-probing\swhere\r\nthe\ssort\sof\sencapsulations\sthat\smake\seffective\srefactoring\r\npossible\sget\sbroken\sfor\sthe\ssake\sof\ssub-microsecond\sdifferences.\r\nIt's\spolishing\sa\sstatue\sbefore\sit\seven\stakes\sits\sform.\r\n\r\nThat\ssaid,\sperformance\sis\simportant,\sand\sthat's\swhy\sI\sasked\r\nthis\sticket\sbe\sopened\sso\sthat\swe\swould\saddress\sthis\sproblem\r\nin\stime.\r\n\r\nLooking\sa\sbit\slonger\sand\smore\scarefully\snow,\sI\sthink\san\r\nadaptation\sof\sthis\swill\sbe\sfine.\s\sI'll\stake\sa\sstab\sat\sit\r\nas\sI\sshift\sthe\sbranches\saround.\r\n\r\nI\swill\snote\sthat\sit's\sa\sknown\sassertion\sthat\s(opnd\s>=\s2)\r\nso\smuch\sof\sthe\sadded\scode\scovers\scases\sthat\scannot\shappen.\r\nI'll\smake\sthat\sclear\sin\smy\sedits.
J login dgp
J mimetype text/plain
K 716b427f76f8f97a8d9a06043903c53bb2b592c2
U dgp
Z 581596b2d5231de287b1843164e25159