Skip to content

Small ZipList optimisation

vdukhovni requested to merge trac-vdukhovni/ghc:ziplist-perf-tweak into master

In (<|>) for ZipList, avoid processing the first argument twice (both as first argument of (++) and for its length in the drop count of the second argument).

Previously, the entire first argument was forced into memory, now (<|>) can run in constant space even with long inputs.

Merge request reports