[Yhc] ByteString

Creighton Hogg wchogg at gmail.com
Fri Jun 15 08:13:56 EDT 2007


On 6/15/07, Neil Mitchell <ndmitchell at gmail.com> wrote:
>
> Hi Creighton,
>
> > I think Neil means here that you can't write a .cabal file, for code
> > that uses Data.ByteString, that will work unchanged with ghc 6.4 and ghc
> > 6.6, since the module is in a different package in each case.
>
> Neil means he's been bitten by ByteString and Cabal many many times... :-)
>
> After discussing with Malcolm, we think a cleaner (and potentially
> faster) way to go would be move to plain old String. Most of the
> strings in Yhc are short - something ByteString isn't particularly
> optimised for. String is also faster than PackedString, the only
> reason for PackedString was memory requirements, but that stopped
> being an issue years ago.
>
> So in essence, a port from PackedString to String is probably the best
> way to go!
>
> The way I'd go about this is:
>
> 1) Write a String implementation of the interface we use for PackedString
>
> 2) Start inlining the implementation manually, function by function
>
> That way you should have relatively little work to move to String, and
> should be able to then patch by patch move towards a proper use of
> String, without doing one big change.


Okay, that sounds good.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/yhc/attachments/20070615/50768c19/attachment.htm


More information about the Yhc mailing list