<i>GrowStringBuffer and GrowUnicodeBuffer do not check for overflows</i> status still Open with 3 other changes
by
.
D 2023-05-06T02:36:37.468
J icomment Gustaf,\r\n\r\nI\sthink\scertainly\sit\swould\svery\smuch\sbe\sof\sinterest\sat\ssome\spoint,\sthough\sprobably\snot\sright\saway\s(question\sof\spriorities).\sThere\sare\sa\svariety\sof\sexpansion\sproposals\sin\sthe\sliterature\sas\swell\sas\sactual\simplementations\sand\schoosing\sone\sneeds\ssome\samount\sof\sanalysis\sand\sactual\smeasurement\swhich\sis\stime\sconsuming.\r\n\r\nWith\srespect\sto\sreducing\sthe\sfactor\sas\sallocations\sgrow,\sthe\samortization\sanalysis\sI've\sseen\sthat\sprove\sO(1)\scomplexity\sdepend\son\sa\sconstant\sgrowth\sfactor\s(>\s1).\sI\sam\snot\sgood\senough\sin\scomplexity\sanalysis\sto\sknow\sif\sthat\sstill\sholds\sgood\sif\sthat\sfactor\sis\snot\sconstant\sbut\sdependent\son\sallocation\ssize.\r\n\r\nHowever,\sthe\sresizing\s/\sexpansion\salgorithm\sis\snow\sin\sjust\sone\splace\sfor\sstrings\sand\slists\s(TclUpsize*\sfunctions\sin\stclInt.h)\sso\sexperimenting\sis\sa\slittle\seasier\sas\scode\sdoes\snot\shave\sto\schange\sin\smultiple\splaces.\r\n\r\nI\shad\smissed\sthe\sexpansions\sin\sDString\sso\sthanks.\sThat\sneeds\sto\sbe\supdated.\r\n\r\nI\shad\salso\snot\srealized\sthe\simplications\sabout\sthread\scontention.\r\n\r\n/Ashok
J login apnadkarni
J mimetype text/plain
K c9663296fd31fbb2fa1ff1cf019b59f432983516
U apnadkarni
Z 474f682a93cc03b0ef089160bf18941c