I'd fetch it all at once into a single byte array and try Arrays.equals()
On Sat, Jul 2, 2011 at 12:45 PM, Jeffrey Kesselman wrote:
> GetLong has to get it a byte at a time still to support endianess.
>
> Id have to think about it, but what you really want is to get it all
> into a byte array an
GetLong has to get it a byte at a time still to support endianess.
Id have to think about it, but what you really want is to get it all
into a byte array and then process it in 64bits. AIR there are some
new array recasting things in Java 5+. Ill need to go look at them
more closely...
On Fri,
Quoting Yang :
I'd guess that getLong() is not faster because get() probably already benefits
from processor cache etc.
There are two concrete subclasses of ByteBuffer that implement get() -
HeapByteBuffer and DirectByteBuffer (for mapped memory).
It might be possible to optimise the comparison
unsubscribe
I can see from profiling that a lot of the time in both reading and writing
are spend on ByteBuffer compare on the column names (for long rows with many
columns)
I looked at the ByteBufferUtil.unsignedCompareByteBuffer() , it's basically
the same structure as standard JVM ByteBuffer.compare()
loop