incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Kesselman <>
Subject Re: faster ByteBuffer comparison
Date Sat, 02 Jul 2011 16:45:08 GMT
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 <> 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
> 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.

View raw message