Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-8614

Select optimal CRC32 implementation at runtime

    XMLWordPrintableJSON

Details

    Description

      JDK 8 has support for an intrinsic for CRC32 that runs at 12-13 gigabytes/sec per core in my quick and dirty test. PureJavaCRC32 is < 800 megabytes/sec if I recall and it has a lookup table that evicts random cache lines every time it runs.

      In order to capture the benefit of that when it is available we can select a CRC32 implementation at startup in a static block.

      If JDK 8 is not what is running we can fall back to the existing PureJavaCRC32 implementation.

      Attachments

        1. CRC32.class
          0.5 kB
          Ariel Weisberg
        2. 8614.patch
          12 kB
          Ariel Weisberg
        3. Sample.java
          4 kB
          Ariel Weisberg

        Issue Links

          Activity

            People

              aweisberg Ariel Weisberg
              aweisberg Ariel Weisberg
              Ariel Weisberg
              Benedict Elliott Smith
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: