3 ms·
How does a piece table differ from a linked list?
by frandroid 9y ago
How does a piece table differ from a linked list?
- ithkuil 9y agoMore similar to a rope/cord: https://en.m.wikipedia.org/wiki/Rope_(data_structure) https://en.m.wikipedia.org/wiki/Rope_(data_structure)
- ww520 9y agoLinked list is a generic data structure with the linking information specified and none of the content is specified. Piece Table spells out what kind of content data to maintain, like the offset and length of the data fragments of the original document and the change log document.
- thomastjeffery 9y agoIn a Piece Table, a Piece is a representation of an edit. You can keep these edits in any structure you want, including a linked list. If you are interested, I posted such an implementation (using Haskell) here: https://news.ycombinator.com/item?id=15381886 https://news.ycombinator.com/item?id=15381886