Roman Kennke wrote:
On most free JVMs that I know of (libgcj), array accesses are much
faster than the corresponding actions on a java.nio.Buffer.
I don't think so. The normal bytebuffer is also only an array. The
accessor methods should not make much difference.
The key difference is that, in gcj for example, an array access is
translated in to a machine instruction that directly accesses the
desired element. Access through a java.nio.Buffer involves at least one
function call which is a much heavier weight operation.
David Daney