djspiewak/gll-combinators — Issue #1: LineStream Comparison Made Contents
Author: djspiewak
Created: 2011-10-13 14:51:10+00:00
State: open

```scala
LineStream("fourty-two") == LineStream("fourty-two")
```

This is very bad, because it means that the algorithm is spending a *lot* of time paging the entire stream into memory and walking from one end to the other. `LineStream` equality *and* hashing must be defined by object identity (or some approximate), otherwise the algorithm takes on a very large additional constant factor and a lower bound of n^2.