My results are similar.

Old IO byte array read average time (ms): 844
NIO byte array read average time (ms): 875
Old IO one byte read average time (ms): 156
NIO one byte read average time (ms): 234
Old IO one line read average time (ms): 156
NIO one line read average time (ms): 203

I don't see anything strang with the NIO code, it just feels like
there must be something wrong.  Perhaps that's why Sun chose NIO
instead of something else like FastIO :)

Mike

On 9/2/05, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:
> Folks,
> 
> I have completely refactored the HTTP data receiver and transmitter
> classes based on the classic IO. As incredible as it may sound this
> resulted in almost four-fold performance improvement on one byte and
> line read operations. Now classic IO completely decimates NIO on my
> Linux box
> 
> Before refactoring
> =================
> Old IO byte array read average time (ms): 208
> NIO byte array read average time (ms): 212
> Old IO one byte read average time (ms): 642
> NIO one byte read average time (ms): 176
> Old IO one line read average time (ms): 819
> NIO one line read average time (ms): 326
> 
> After refactoring
> =================
> Old IO byte array read average time (ms): 193
> NIO byte array read average time (ms): 209
> Old IO one byte read average time (ms): 107
> NIO one byte read average time (ms): 173
> Old IO one line read average time (ms): 164
> NIO one line read average time (ms): 328
> 
> Source:
> http://svn.apache.org/repos/asf/jakarta/httpclient/trunk/http-common/src/test/tests/performance/HttpNIOvsHttpOIOTest.java
> 
> In my opinion there's no longer a single reason to keep NIO in the
> HttpCommon package
> 
> Oleg
> PS: I'll be on vacation from tomorrow until next Saturday, Sept 10th.
> Talk to you in a week
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to