Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0ECCC674C for ; Wed, 1 Jun 2011 21:11:33 +0000 (UTC) Received: (qmail 3100 invoked by uid 500); 1 Jun 2011 21:11:31 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 3004 invoked by uid 500); 1 Jun 2011 21:11:31 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 2866 invoked by uid 99); 1 Jun 2011 21:11:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jun 2011 21:11:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jun 2011 21:11:28 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 985BAEED5A for ; Wed, 1 Jun 2011 21:10:47 +0000 (UTC) Date: Wed, 1 Jun 2011 21:10:47 +0000 (UTC) From: "Randall Leeds (JIRA)" To: dev@couchdb.apache.org Message-ID: <1337852724.60953.1306962647620.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1096411398.65711.1303163885757.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Assigned] (COUCHDB-1130) binary optimization in couch_file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-1130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Randall Leeds reassigned COUCHDB-1130: -------------------------------------- Assignee: Randall Leeds > binary optimization in couch_file > --------------------------------- > > Key: COUCHDB-1130 > URL: https://issues.apache.org/jira/browse/COUCHDB-1130 > Project: CouchDB > Issue Type: Improvement > Components: Database Core > Affects Versions: 1.0.2 > Reporter: Randall Leeds > Assignee: Randall Leeds > Priority: Minor > Attachments: 0001-refactor-remove_block_prefixes-2-for-optimization.patch, davisp_prof_bin_opt, prof_bin_opt > > > I've had this patch sitting around since January and kept forgetting to file the ticket. Hurray spring cleaning. > Just for fun I ran erlc with +bin_opt_info, which gives information about how the Erlang VM can optimize creating binary objects. > What follows is the commit message from my patch. > Even if I'm wrong about the last point, it can't hurt. > What think you all? > ------------------- > Running erlc with +bin_opt_info gives an INFO message stating that "matching > anything else but a plain variable to the left of a binary pattern will prevent > delayed sub binary optimization; SUGGEST changing argument order" > I guess matching 0 is triggering this. If I understand correctly, this change > will allow the compiler to skip creating a sub-binary that starts at the block > boundary in the third clause and delay creation until we strip the leading byte > in the 0 clause. This means one less 1-byte binary every time we read across a > block boundary. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira