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 8D7B5200B5C for ; Wed, 27 Jul 2016 18:53:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8C3CD160A6F; Wed, 27 Jul 2016 16:53: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 E81BB160A90 for ; Wed, 27 Jul 2016 18:53:21 +0200 (CEST) Received: (qmail 31698 invoked by uid 500); 27 Jul 2016 16:53:21 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 31639 invoked by uid 99); 27 Jul 2016 16:53:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2016 16:53:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A60D72C0D63 for ; Wed, 27 Jul 2016 16:53:20 +0000 (UTC) Date: Wed, 27 Jul 2016 16:53:20 +0000 (UTC) From: "Daryn Sharp (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-10662) Optimize UTF8 string/byte conversions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 27 Jul 2016 16:53:22 -0000 [ https://issues.apache.org/jira/browse/HDFS-10662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15395972#comment-15395972 ] Daryn Sharp commented on HDFS-10662: ------------------------------------ Test failures are unrelated. This is just about conversions. > Optimize UTF8 string/byte conversions > ------------------------------------- > > Key: HDFS-10662 > URL: https://issues.apache.org/jira/browse/HDFS-10662 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: hdfs > Reporter: Daryn Sharp > Assignee: Daryn Sharp > Attachments: HDFS-10662.patch > > > String/byte conversions may take either a Charset instance or its canonical name. One might think a Charset instance would be faster due to avoiding a lookup and instantiation of a Charset, but it's not. The canonical string name variants will cache the string encoder/decoder (obtained from a Charset) resulting in better performance. > LOG4J2-935 describes a real-world performance boost. I micro-benched a marginal runtime improvement on jdk 7/8. However for a 16 byte path, using the canonical name generated 50% less garbage. For a 64 byte path, 25% of the garbage. Given the sheer number of times that paths are (re)parsed, the cost adds up quickly. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org