It depends what you mean. Seq has nice asymptotics but quite poor constant factors.
Do you consider DList as requiring a separate building phase? If so, the answer is quite possibly that the data structure you want doesn't exist. But for most code I think the existing solutions are good enough (and performance requirements lax enough) that nobody has put much effort into anything better.
John L.
I want an interface that supports efficient appending without requiring a separate building phase or other hassles. Does this not exist?I get that a library author might want to deal with the hassle of alternatives. But as an application author there are times that all I care about is a clean and simple interface that supports efficient appends._______________________________________________On Sun, Dec 28, 2014 at 1:01 AM, Roman Cheplyaka <roma@ro-che.info> wrote:On 27/12/14 17:03, Greg Weber wrote:
> Sequence is not used nearly enough.
Not really. Seq has high constant factors and for small sizes is often
slower than plain lists. Nor is it space-efficient (for big sizes).
It probably has its use cases, but most of the time you'd be better off
with one of the other choices:
* plain old lists
* difference lists (trees)
* lists "without remorse"
* vectors
* lazy vectors (lists of vectors)
Roman
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries