[Haskell-cafe] Using loop fusion for writing efficent high-level
code Re[2]: [Haskell] [Fwd: Re: Computer Language Shootout]
Bryan O'Sullivan
bos at serpentine.com
Wed Feb 28 12:51:42 EST 2007
Bulat Ziganshin wrote:
> can you please provide examples of such code?
I'd recommend taking a look at the new binary package. It's very
cleanly written, and mostly easy to understand. It's also easy to see
where the optimisations have been made. The only part that might induce
sudden cranial expansion is the Builder monoid, which constructs a big
delayed computation to efficiently fill out a lazy ByteString when the
Put monad is run.
The optimisations haven't perverted the readability of the code much,
but it's still quite fast. I've clocked end-to-end serialisation and
deserialisation over an Infiniband network at 234 MB/sec (~25% of line
rate). This consumed about 90% of one CPU on the sending side, while
the receiving side was 100% pegged.
<b
More information about the Haskell-Cafe
mailing list