[Haskell-cafe] Re: String vs ByteString
bos at serpentine.com
Sat Aug 14 21:05:13 EDT 2010
On Sat, Aug 14, 2010 at 5:11 PM, John Millikin <jmillikin at gmail.com> wrote:
> This attitude towards performance, that it doesn't really matter as
> long as something happens *eventually*, is what pushed me away from
> Python and towards more performant languages like Haskell in the first
But wait, wait - I'm not at all contending that performance doesn't matter!
In fact, I spent a couple of months working on criterion precisely because I
want to base my own performance work on extremely solid data, and to afford
the same opportunity to other people. So far in this thread, there's been
exactly one performance number posted, by Daniel. Not only have I already
thanked him for it, I immediately used (and continue to use) it to improve
the performance of the text library in that instance.
More broadly, what I am recommending is simple:
- Use a good library.
- Expect good performance out of it.
- Measure the performance you get out of your application.
- If it's not good enough, and the fault lies in a library you chose,
report a bug and provide a test case.
In the case of the text library, it is often (but not always) competitive
with bytestring, and I improve it when I can, especially when given test
cases. My goal is for it to be the obvious choice on several fronts:
- Cleanliness of API, where it's already better, but could still improve
- Performance, which is not quite where I want it (target: parity with,
or better than, bytestring)
- Quality, where text has slightly more test coverage than bytestring
However, just text alone is a big project, and I could get a lot more done
if I was both coding and integrating patches than if coding alone :-) So
patches are very welcome.
> In the unlikely event that you need to support non-Unicode encodings,
> > they are readily available via text-icu.
> Unfortunately, text-icu is hardcoded to use libicu 4.0, which was
> released well over a year ago and is no longer available in many
> distributions. I sent you a patch to support newer versions a few
> months ago, but never received a response.
Yes, that's quite embarrassing, and I am quite apologetic about it,
especially since I just asked for help in the preceding paragraph. If it's
any help, there's a story behind my apparent sloth: I overenthusiastically
accepted a patch from another contributor a few months before yours, and his
changes left the text-icu darcs repo in a mess from which I have yet to
rescue it. I do still have your patch, and I'll probably abandon my attempts
to clean up the other one, as it was more work than I cared to clean it up.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe