For Raw throughput, on a single thread, with no blocking involved, nio is
slower than io

But for highly concurrent multi-threaded applications with blocking,
connection pooling, concern for both throughput and latency, etc...
You really have to clarify how you're defining "slower" :)

Unless you're talking about memory-mapped nio filechannels, that's often
faster than the alternatives, even in single-threaded operation.


On 30 July 2010 08:19, Reinier Zwitserloot <[email protected]> wrote:

> nio is slower than io.
>
> On Jul 29, 9:45 am, Christian Catchpole <[email protected]>
> wrote:
> > Sounds like a case for NIO.
> >
> > On Jul 29, 5:07 pm, Alan Kent <[email protected]> wrote:
> >
> >
> >
> > > On 29/07/2010 4:27 PM, Kirk wrote:
> >
> > > > Microbenchmarks are as useful as any other type of benchmarking. The
> problem is, they are very very very difficult to get right. You need to do a
> lot of work to validate the results you get from any benchmark, large or
> small. I've missed the beginning of the conversation so I never saw all of
> the code but then maybe it was never published.
> >
> > > Just a bit of back fill (happy for this thread to die off now) - I had
> > > some raw C struct like data in an array of bytes.  I am trying to put
> > > forward a case for using Java (or maybe Scala) instead of C/C++ in a
> > > project.  Performance is critical.  In C/C++, one argument is you can
> > > cast the pointeer to the array of bytes and volia! you can access all
> > > the int's etc.  Very performant.  Obviously cannot do this in Java, so
> > > was trying to work out how close I could get Java to squash this
> > > argument (if possible).  Obviously the overall application makes a big
> > > difference too.  Right now C++ is safe from a performance perspective,
> > > Java safer from a code maintainability perspective.  There is a hard
> > > performance requirement on the project (harder than the code
> > > maintainability requirement).
> >
> > > Thanks
> > > Alan
>
> --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<javaposse%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>
>


-- 
Kevin Wright

mail/google talk: [email protected]
wave: [email protected]
skype: kev.lee.wright
twitter: @thecoda

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to