
I tend to agree with Alastair. I just reran the experiments with BinIOs instead of BinMems to see if there was a greater difference (I expect a much smaller difference, in fact, due to the high disk overhead and the fact that putChar is slow). I didn't both with -O0, but with -O2, we get: bits read 2156 write 2639 bytes read 1617 write 2078 frankly, this shocks me. reading using bits is 33% slower; writing is about 27% slower. i actually expected the bits version to be *faster* (relatively, of course) here, due to the fact that we have much smaller files (the byte-based file is 4200000 bytes while the bit-based file is 3325000 bytes). With a 33% difference, I think I might want separate instances again :). I'm having great difficulty explaining to myself why there would be such a discrepancy. Anyone care to offer an idea? - Hal On 18 Dec 2002, Alastair Reid wrote:
Hal Daume
writes: Hi, another update wrt speed of bit writes; it makes me think it might not be worthwhile to split the instances or anything like that. I'm still looking for some comments though (hint hint).
If the performance difference is just 11%, it sounds like it's best to keep the instances combined. (I'm assuming both versions were carefully written for speed - seems like a safe assumption given the author!) The speed difference is likely to continue as the speed difference between processors,memory,etc. and disks,system calls,etc. continues to grow.
-- Alastair Reid alastair@reid-consulting-uk.ltd.uk Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries