Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1D05B10EA7 for ; Wed, 14 Jan 2015 02:31:36 +0000 (UTC) Received: (qmail 76809 invoked by uid 500); 14 Jan 2015 02:31:37 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 76775 invoked by uid 500); 14 Jan 2015 02:31:37 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 76734 invoked by uid 99); 14 Jan 2015 02:31:37 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jan 2015 02:31:37 +0000 Date: Wed, 14 Jan 2015 02:31:37 +0000 (UTC) From: "Ariel Weisberg (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-8614) Select optimal CRC32 implementation at runtime MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-8614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14276400#comment-14276400 ] Ariel Weisberg commented on CASSANDRA-8614: ------------------------------------------- I checked Netty's PlatformDependent for how they did it and copied that. The question would be why they did it that way? Maybe to avoid error prone string parsing? I m fine with switching to parsing the java.version string. > Select optimal CRC32 implementation at runtime > ---------------------------------------------- > > Key: CASSANDRA-8614 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8614 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Ariel Weisberg > Labels: performance > Attachments: 8614.patch > > > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)