Proposal: Add {to, from}Strict conversion functions between strict and lazy ByteStrings
Gábor Lehel
illissius at gmail.com
Sat Oct 29 14:23:32 CEST 2011
On Sat, Oct 29, 2011 at 2:18 PM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
> On 29 October 2011 12:05, Herbert Valerio Riedel <hvr at gnu.org> wrote:
>> I propose to add optimized {to,from}Strict conversion functions between
>> strict and lazy ByteStrings to the Data.ByteString.Lazy API.
>
> +1
>
> Maybe this is bikeshedding and I'm not sure I like it but we could
> also rename these functions to:
>
> toStrict -> fromLazy
> fromStrict -> toLazy
>
> Because we nowhere mention the word 'strict' in the bytestring API but
> we do mention to word 'lazy'.
In that case, I think they should be in the non-Lazy module?
ByteString.Lazy.fromLazy/toLazy sound a bit odd... (at a first
impression, you'd think they were identity functions).
>
> Any idea why "toStrict/simple #1" is faster than "toStrict/optimized #1"?
>
> Regards,
>
> Bas
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
--
Work is punishment for failing to procrastinate effectively.
More information about the Libraries
mailing list