
simons:
import System.IO import Foreign ( allocaBytes ) import qualified Data.ByteString as Str
bufsize :: Int bufsize = 4 * 1024
In order to determine I/O performance, a random 512 MB file is copied from standard input to standard output. All test programs have been compiled with GHC 6.6.1 using "-O2 -funbox-strict-fields" for optimization. The time to beat for this test comes from /bin/cat:
$ dd if=/dev/urandom of=test.data bs=1M count=512 $ time /bin/cat
/dev/null real 0m2.097s 0m2.135s 0m2.100s user 0m0.036s 0m0.028s 0m0.024s sys 0m2.060s 0m2.108s 0m2.076s
Thanks for the data points. It's been a while since I benchmarked the IO performance, so looks like time to revisit this issue. -- Don