Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specialize SequenceValue equals and compareTo
Some SequenceValue implementations have list like behaviour, and do thus not support constant speed random access. In these cases it will be much faster to iterate over the sequence using an Iterator. We introduce a way to discover the preferred method of iteration from any sequence value, and specialize the SequenceValue equals and compareTo so that they are always O(n+m), where n and m are the sizes of the sequences.
- Loading branch information
Showing
3 changed files
with
172 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters