Artifact
5765b4cf3f3c50865eec8177932e60675a8f3842:
Ticket change
[5765b4cf3f]
- Ticket
[f97d4ee02082971e|f97d4ee020] <i>quadratic cost of hash table teardown</i> status still Open with 5 other changes
by
dkf on
2015-07-23 13:37:18.
D 2015-07-23T13:37:18.892
J icomment The\ssimplest\spossible\sthing\swould\sbe\sto\stry\susing\s<tt>Tcl_NextHashEntry</tt>\sduring\sthe\steardown\sinstead\sof\s<tt>Tcl_FirstHashEntry</tt>.\sThe\sonly\sreason\sfor\susing\sthe\sother\sone\sis\sif\syou\sare\sadding\selements\sduring\sthe\steardown;\sif\swe\scan\sconfirm\sthat\sthat\swon't\shappen,\swe\swon't\shit\sproblems\ssince\s<tt>Tcl_NextHashEntry</tt>\sis\ssafe\sfor\sthe\siteration/deletion\spattern.\r\n<p>\r\nCallbacks\sare\sOK\sprovided\sthey\sdon't\smodify\sthe\shash\stable\sitself.\sSome\ssort\sof\sflag\sin\sthe\sentries\s(not\sthe\s<tt>Tcl_HashEntry</tt>\sbut\sthe\sthings\sthey\spoint\sto)\sand\sanother\sin\sthe\sstructure\scontaining\sthe\shash\stable\smight\sbe\senough.\sI'd\slike\sto\savoid\sputting\sthe\ssmarts\sin\sthe\s<tt>Tcl_HashTable</tt>\ssystem\sitself\sas\sthat's\salready\squite\scomplicated\senough\sfor\sa\sfundamental\sdata\sstructure.
J login dkf
J mimetype text/html
J priority 8
J username dkf
K f97d4ee02082971e4b86a853c18c093fd0b2a45d
U dkf
Z 2eb2d36689f20c2566389db4d0bab862