bench: optimize io.c benchmark
authorBen Noordhuis <info@bnoordhuis.nl>
Thu, 10 Nov 2011 20:11:19 +0000 (21:11 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 10 Nov 2011 20:13:37 +0000 (21:13 +0100)
commit78ca5558451e29a6245f7a75c9b454a6ce7012f3
tree1c093d1d46af1106b5354eff64b10b9f197bce52
parent0757c73a20da712b06bccdee7a322fd21dd6c799
bench: optimize io.c benchmark

Use static buffers. Most clock ticks were spent in malloc() and free() instead
of read() and write().

Fix measurements. Really fast runs would result in bogus results like:

  Wrote 1048576000 bytes in -0.731630s using 8192 byte buffers: -1366.811093mB/s
benchmark/io.c