Brendon McLean wrote:
>I'm busy writing SQL so mundane my brain is trying to escape from my
>skull. In other words, I decided to write a little IO test program
>to see what results I get.
Why? What's the point? Are you writing a Java program that's I/O-bound?
That is, why does the cross-platform I/O speed matter?
>Sample program attached. Please berate me if there's anything wrong
>with it.
The buffer-size of your buffered input and output streams is the default:
2 KB for input
0.5 KB for output (512 bytes)
The buffering is simply useless in the circumstances:
read & write lengths of BUF_SIZE = 8 KB.
For a 50 MB file, an 8 KB chunk size is pretty silly, too.
If you're going to benchmark I/O speed, you may as well benchmark NIO,
because that's almost certainly the domain most likely to obtain the
machine's highest speed. Otherwise you're putting a jet engine on
tricycle. The platform limitations will limit you before the engine's
horsepower will.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden