Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4F377200B4E for ; Sun, 24 Jul 2016 19:49:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4DAF0160A87; Sun, 24 Jul 2016 17:49:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BA5B2160A74 for ; Sun, 24 Jul 2016 19:49:21 +0200 (CEST) Received: (qmail 76781 invoked by uid 500); 24 Jul 2016 17:49:20 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 76750 invoked by uid 99); 24 Jul 2016 17:49:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jul 2016 17:49:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8ED442C0D61 for ; Sun, 24 Jul 2016 17:49:20 +0000 (UTC) Date: Sun, 24 Jul 2016 17:49:20 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16278) Use ConcurrentHashMap instead of ConcurrentSkipListMap if possible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 24 Jul 2016 17:49:22 -0000 [ https://issues.apache.org/jira/browse/HBASE-16278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15391123#comment-15391123 ] stack commented on HBASE-16278: ------------------------------- Makes sense [~Apache9] > Use ConcurrentHashMap instead of ConcurrentSkipListMap if possible > ------------------------------------------------------------------ > > Key: HBASE-16278 > URL: https://issues.apache.org/jira/browse/HBASE-16278 > Project: HBase > Issue Type: Improvement > Reporter: Duo Zhang > > SSD and 10G network make our system CPU bound again, so the speed of memory operation only code becomes more and more important. > In HBase, if want to use byte[] as a map key, then we will always use CSLM even if we do not need the map to be ordered. I know that this could save one object allocation since we can not use byte[] directly as CHM's key. But we all know that CHM is faster than CSLM, so I wonder if it worth to use CSLM instead of CHM only because one extra object allocation. > Then I wrote a simple jmh micro benchmark to test the performance of CHM and CSLM. The code could be found here > https://github.com/Apache9/microbench > It turns out that CHM is still much faster than CSLM with one extra object allocation. > So I think we should always use CHM if we do not need the keys to be sorted. -- This message was sent by Atlassian JIRA (v6.3.4#6332)