From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id F2C7317CD606 for ; Wed, 12 Mar 2014 10:11:42 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id D152DB5D9A5 for ; Wed, 12 Mar 2014 10:07:57 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id DB0BD97A82C for ; Wed, 12 Mar 2014 10:07:58 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2QrolhPeappY for ; Wed, 12 Mar 2014 10:07:58 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id B76A897A820 for ; Wed, 12 Mar 2014 10:07:58 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 2D73395241B for ; Wed, 12 Mar 2014 10:07:57 +0900 (JST) Received: from [221.186.184.76] (unknown [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 851AD12050D; Wed, 12 Mar 2014 10:07:44 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by neon.ruby-lang.org (Postfix) with ESMTP id 68463120494 for ; Wed, 12 Mar 2014 10:07:34 +0900 (JST) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1561B2030C; Wed, 12 Mar 2014 01:07:33 +0000 (UTC) Date: Wed, 12 Mar 2014 01:07:32 +0000 From: Eric Wong To: ruby-core@ruby-lang.org Message-ID: <20140312010732.GA16119@dcvr.yhbt.net> References: <20140312000622.GA7155@dcvr.yhbt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140312000622.GA7155@dcvr.yhbt.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-ML-Name: ruby-core X-Mail-Count: 61426 Subject: [ruby-core:61426] Re: [REJECT?] xmalloc/xfree: reduce atomic ops w/ thread-locals X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Eric Wong wrote: > I'm unsure about this. I _hate_ the extra branches this adds; > and most of our benchmarks don't show an improvement. But this > seems like an obvious experiment, so maybe somebody else would've > tried it if I didn't at least publish it here. The extra branching hurt bm_so_count_words performance on my older AMD Phenom II. Not much difference either way on a more recent AMD FX-8320. > http://bogomips.org/ruby.git/patch?id=8271ec7b977 git://80x24.org/ruby.git gc-lessatomic Updated with: http://bogomips.org/ruby.git/patch?id=d959cb6201 gc.c (objspace_malloc_increase): annotate likely/unlikely branches This is necessary for an older AMD Phenom II X4 945 CPU to even match performance before the thread-local counters on bm_so_count_words. Original benchmarks were done on a Xeon E3-1230 v3 with Turbo Boost disabled.