[Haskell-cafe] code review? store server, 220loc.
Bryan O'Sullivan
bos at serpentine.com
Mon Aug 4 20:15:26 EDT 2008
On Sat, Aug 2, 2008 at 10:13 PM, Tim Newsham <newsham at lava.net> wrote:
> Anyone interested in critiquing some code? I'm looking for ideas
> for making it faster and/or simpler:
>
> http://www.thenewsh.com/%7Enewsham/store/Server5.hs
The code looks fairly reasonable, although most of your strictness
annotations are unlikely to do much (particularly those on String
fields).
You should try profiling this. I can see a few possible problems (such
as reading String from a socket, instead of a ByteString), but it's
difficult to predict what might be causing your code to be so slow.
Haskell code ought to be much more competitive with C for an
application like this.
More information about the Haskell-Cafe
mailing list