gearley
gearley copied to clipboard
Investigate duplication of medial items -- does it happen?
Creation of medial items has only two causes.
- completed item advances a predicted item
- scanned token advances a predicted item
As far as can I see, item completions themselves are unique, so they give unique medial items. Moreover, if scanning was guarded against duplicate completions, we would achieve uniqueness of medial items without the need for deduplication. We still have to sort lists of medial items so that binary search can be used on them later. However, the sorting algorithm can be modified to work faster on lists of unique items.