You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the internal functions arc, arc_, arcNN, or prepend to rebuild the spine after deleting values, under certain circumstances we can end up chaining those together and thus encounter an asymptotic slowdown similar to #25 (albeit greatly reduced in scope and severity). However, unlike #25, the bug here is not intrinsic to the data structure. We should be able to adjust those functions to behave more like a zipper, and only do the bytestring concatenation once an arc is "complete" (akin to the use of RevLazyByteString in the priority-queue functions).
The text was updated successfully, but these errors were encountered:
Fwiw, this can only (potentially) affect functions that delete several values (and not in a delete-a-whole-subtrie way). If only a single value is deleted, then while there may be iterated calls to those functions, at most one of them can actually result in a bytestring append (thanks to our invariants). In order to trigger the bug, you'd need to delete several values whose keys are all prefixes of one another (but leaving a value whose key all the deleted keys are prefixes of), and/or deleting entire side branches off of such a prefix chain— because every value and branch point serves as a terminator for iterated bytestring appends.
Since it requires such specific conditions to trigger, I'm removing the "Bug" label for now.
When using the internal functions
arc
,arc_
,arcNN
, orprepend
to rebuild the spine after deleting values, under certain circumstances we can end up chaining those together and thus encounter an asymptotic slowdown similar to #25 (albeit greatly reduced in scope and severity). However, unlike #25, the bug here is not intrinsic to the data structure. We should be able to adjust those functions to behave more like a zipper, and only do the bytestring concatenation once an arc is "complete" (akin to the use ofRevLazyByteString
in the priority-queue functions).The text was updated successfully, but these errors were encountered: