[Haskell-cafe] Bit streams programs in Haskell

Per Gustafsson per.gustafsson at it.uu.se
Mon Mar 27 11:56:55 EST 2006


Hi

Thanks to everyone that have helped, the runtimes for the haskell 
programs have decreased significantly, presently they look like this 
compared to O'Caml:

Benchmark   haskell     ocaml
drop3       5.786       3.151
five11      8.657       7.692
huffman     7.134       18.593
uudecode    6.042       2.657
uuencode    7.775       2.824

The huffman benchmark should not really be that slow, but it seems that 
O'Caml programs that build large lists tend to be slow.

The versions that I have used in this measurement is available at:

http://bitbenches.infogami.com/

Many thanks to the people that have responded, and if you have more 
comments on the programs, particularily uudecode and uuencode (which I 
have mostly written myself), feel free to suggest further improvments.

Note also that uudecode and uuencode for both O'Caml and Haskell breaks 
the rules slightly by creating an array for each row that is created. To 
end up with a list of rows that is than turned into one array. Is there 
a library fuction that can do this?

I wrote a function myself, but it is not very pretty.

Per


More information about the Haskell-Cafe mailing list