On Feb 25, 2009, at 8:40 AM, byhisdeeds wrote:
> > On Feb 20, 5:15 am, Rémi Forax <[email protected]> wrote: >> I don't know if there is another method but you can improve the >> following code, >> remove the two asInBuffer() because they allocate a new Java object >> and use getInt()/putInt() instead of get()/put(). > I take the point and I think this will give me a little boost. I'll > post the > profile soon. Bill's reply allured to this -- if the ByteBuffers hasArray(), you can access the underlying backing arrays via array(). Directly accessing the arrays avoids the bounds checking of get/put. Don't forget to take arrayOffset() into account. -- Philip Jenvey --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" 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/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
