Commit abcf9b7
committed
docs(cache): correct remove() complexity comment
The previous comment claimed O(1) location lookup; in practice the
dnIndex only confirms presence, then a linear scan over c.items finds
the matching slice element by pointer comparison, and buildIndexes()
rebuilds every index. Overall removal is O(n).
Addresses review feedback on #579.
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>1 parent cea1767 commit abcf9b7
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
| |||
0 commit comments