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 <jef...@gmail.com> 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 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, Jul 1, 2011 at 5:42 PM, Yang <teddyyyy...@gmail.com> wrote: > > 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() > > looping over each byte doing a ByteBuffer.get() > > is there a faster (probably hardware-based) compare ? I tried doing 8 > bytes > > at a time by doing getLong() and it actually seems slower > > thanks > > Yang > > > > -- > It's always darkest just before you are eaten by a grue. > -- It's always darkest just before you are eaten by a grue.