[CLJ-1373] LazySeq should utilize cached hash from its underlying seq. Created: 09/Mar/14 Updated: 23/Jun/15
1.6.0 master SNAPSHOT
Even if underlying seq contains a cached hash, LazySeq computes it every time.
Approach: If seq produced by LazySeq implementing IHashEq, use it to calculate the hasheq().
|Comment by Jozef Wagner [ 09/Mar/14 9:20 AM ]|
Added patch which checks if underlying seq implements IHashEq and if yes, uses that hash instead of recomputing.
|Comment by Alex Miller [ 04/May/15 9:34 AM ]|
In this patch, can you update the else case (the original code) to use s rather than this, so seq() is not re-called?
|Comment by Jozef Wagner [ 04/May/15 12:30 PM ]|
Added patch [^clj-1373-2.diff] that reuses s for else case.
|Comment by Alex Miller [ 23/Jun/15 2:15 PM ]|
The -2 patch doesn't compile so I guess that was a bad suggestion.