Bryce McKinlay wrote:
> Inlining the hasRemaining() and all its
> friends is easy because they are final, but the buf.get() is a bit
> harder because its a virtual method. However if we taught GCJ that the
> various methods in nio usually/always return a GCJMappedByteBuffer or
> whatever, it could inline the get() too and the whole things becomes no
> less efficient than a regular bounds-checked array acccess.
Why bound-checking? We need to check that the current position is less
than the limit, but there is no need to check that the position is
less than the buffer size (capacity), sizne the limit is always less
than te capacity, at least if we assume a GCJMappedByteBuffer or
whatever.
--
--Per Bothner
[EMAIL PROTECTED] http://www.bothner.com/per/
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath