Looing for advice on profiling

John Meacham john at repetae.net
Thu Nov 11 18:16:43 EST 2004

On Wed, Nov 10, 2004 at 10:07:46AM +0000, Malcolm Wallace wrote:
> "Simon Marlow" <simonmar at microsoft.com> writes:
> > On 09 November 2004 17:04, Duncan Coutts wrote:
> > 
> > >> Are you using BinMem, or BinIO?
> > > 
> > > BinIO
> > 
> > Aaaaah.  BinIO is going to be a lot slower than BinMem, because it does
> > an hPutChar for each character, whereas BinMem just writes into an
> > array.  I never really optimised the BinIO path, because we use BinMem
> > exclusively in GHC.

I have also done a port of the binary library to ghc6 as part of my
ginsu project and done some work on improving its efficiency, in
addition I have updated DrIFT such that it can derive both the old
bitwise nhc style binary as well as the new ghc style byte based binary.
(the byte based version which I use in ginsu is signifigantly faster).
The code can be gotten from ginsu in 

I also have a much improved PackedString based on raw UTF8 in memory
with optimized unboxed folding routines which is designed to be very
fast to serialize with Binary. In ginsu, a switch from String ->
PackedString changed my memory footprint from 200megs to 10. quite a
nice improvement. 

John Meacham - ⑆repetae.net⑆john⑈ 

More information about the Glasgow-haskell-users mailing list