Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753413Ab3JUOux (ORCPT ); Mon, 21 Oct 2013 10:50:53 -0400 Received: from g6t0184.atlanta.hp.com ([15.193.32.61]:1766 "EHLO g6t0184.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752996Ab3JUOuw (ORCPT ); Mon, 21 Oct 2013 10:50:52 -0400 Message-ID: <52653F3E.7030207@hp.com> Date: Mon, 21 Oct 2013 10:50:38 -0400 From: Waiman Long User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 MIME-Version: 1.0 To: Andi Kleen CC: Ingo Molnar , Arnaldo Carvalho de Melo , Peter Zijlstra , Paul Mackerras , Namhyung Kim , Jiri Olsa , Adrian Hunter , David Ahern , Stephane Eranian , linux-kernel@vger.kernel.org, Aswin Chandramouleeswaran , Scott J Norton Subject: Re: [PATCH v2 2/4] perf: streamline append_chain() function References: <1382107129-2010-1-git-send-email-Waiman.Long@hp.com> <1382107129-2010-3-git-send-email-Waiman.Long@hp.com> <87ppr0u6n5.fsf@tassilo.jf.intel.com> In-Reply-To: <87ppr0u6n5.fsf@tassilo.jf.intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 756 Lines: 24 On 10/19/2013 08:29 PM, Andi Kleen wrote: > Waiman Long writes: > >> as well as >> using ?: statement which can be more efficient than the regular if >> statement in some architectures. > I don't think that's true, the compiler does if conversion anyways for both. > > But change seems reasonable. > > -Andi > > That may be true for a simple if statement. However, the condition was checked as the last of 3 tests. I doubt if the compiler is able to optimize that effectively. -Longman -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/