cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ariel Weisberg (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-8684) Replace usage of Adler32 with CRC32
Date Mon, 26 Jan 2015 16:17:35 GMT
Ariel Weisberg created CASSANDRA-8684:

             Summary: Replace usage of Adler32 with CRC32
                 Key: CASSANDRA-8684
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Ariel Weisberg

I could not find a situation in which Adler32 outperformed PureJavaCrc32 much less the intrinsic
from Java 8. For small allocations PureJavaCrc32 was much faster probably due to the JNI overhead
of invoking the native Adler32 implementation where the array has to be allocated and copied.

I tested on a 65w Sandy Bridge i5 running Ubuntu 14.04 with JDK 1.7.0_71 as well as a c3.8xlarge
running Ubuntu 14.04.

I think it makes sense to stop using Adler32 when generating new checksums.

c3.8xlarge, results are time in milliseconds, lower is better
||Allocation size|Adler32|CRC32|PureJavaCrc32||

||Allocation size|Adler32|CRC32|PureJavaCrc32||

Another fun fact. Performance of the CRC32 intrinsic appears to double from Sandy Bridge ->
Haswell. Unless I am measuring something different when going from Linux/Sandy to Haswell/OS

The intrinsic/JDK 8 implementation also operates against DirectByteBuffers better and coding
against the wrapper will get that boost when run with Java 8.

This message was sent by Atlassian JIRA

View raw message