Don Stewart wrote:
r.kelsall:
(Extracting these questions from my previous thread for clarity.)

Below is my simplest possible program to solve the Fasta shootout
benchmark.

http://shootout.alioth.debian.org/gp4/benchmark.php?test=fasta&lang=all
http://haskell.org/haskellwiki/Shootout/Fasta

I can see one remaining flaw - the line marked 'Ugly'. What's the best
way to get rid of this line?

Any other suggestions for simplifying or improving the program would
also be interesting.

This code is about three or four times slower that the current fastest
GHC entry for the Fasta benchmark. I'll elaborate it for speed when
I've produced the best version regardless of speed.

This is quite nice, and you can probably match the current entry
by switching to lazy ByteString IO, as the current entry does.
-- Don


Thanks Don :) I'll try that. The thing I really like about this version
is that it localizes the 'breaking the lines at 60 characters' part of
the program to just one function. I would never have thought to do this
in a language other than Haskell and looking through most of the other
language submissions for Fasta I can't see any that abstract this
feature. I seem to be able to think more clearly in Haskell.


Richard.


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to