Proposal: add ByteString support to unix:System.Posix.IO API
wren ng thornton
wren at freegeek.org
Wed Mar 2 04:00:06 CET 2011
On 3/1/11 6:01 PM, Daniel Fischer wrote:
> On Tuesday 01 March 2011 23:51:05, Ganesh Sittampalam wrote:
>>
>> What's the practical difference between a (lazy) list of strict
>> bytestrings and a lazy bytestring?
>
> Lazy ByteStrings are head-strict. I don't know whether that's relevant
> here, though.
Or rather, element-strict. But I don't think that matters here, since
writing requires element strictness anyways.
It may be significant if I write new versions to use writev for
lists/lazys instead of calling write repeatedly, since we'd have to
force all elements before calling into C. But then writev would require
forcing the spine anyways (to get the length in chunks) so it wouldn't
affect asymptotic behavior or memory retention.
--
Live well,
~wren
More information about the Libraries
mailing list