From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 673693858C60 for ; Tue, 14 May 2024 09:14:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 673693858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 673693858C60 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715678061; cv=none; b=GeXcIPuNHzIgO/2f6YS7RuEpbsfbeSKkigmvkMOSaOJxTPIXA1SUgbZdZcEv4Uqp5lCMCR8K4zhgutluR8xiWqhQhSq4vLPY9uHgXV/ES61DRg4FLAWGn/FZPFKAiqR8Vl3WBMX5PTM/Ijs7x145WoeHEZY9KQXSgABz9H5I4JI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715678061; c=relaxed/simple; bh=iqQBZKASTl7PhbEW4VHYACHgq1i/2Ag3qO61Xpvz2sI=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=K76SFFB4INIAaSUIOxq4rqfPa2e7hbz3o8Iuqjhpxx5IkB5EBxVi0PF/FKISiC7XWmrpcI63D2d+gqXLwnV73S9K55m8hEZJAUQdTlkni6yUFvWwQ+PGzk21fl4jtqKdrgGNZUWfyWk7d565yVLfdYoX69D0EIfLVDMtxEByA70= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2e1fa1f1d9bso94039051fa.0 for ; Tue, 14 May 2024 02:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715678057; x=1716282857; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=8ko/zdDeSeEhX91x3Fd1MVSbuIaq3dK4kXGVMizIPfI=; b=lTxOIoe6p6vd2tXg5osZa5aIihLQU3SUFA9Doo9dgsfkAGU+vU6CgeVkFyaa/b7n/A exoYkYkltyjgxxIAIk8vgHBekdFPK3DJploE8MSVyYYjxdRsa7GhiK3DxTgThLwUOxDs 9FZZvAk9D0ogt4ZnVkpQVrcS1Y2LbJpgaKPoauTjbDPw1wXjjSaDWEz+v7VWSXi23lyg cChjGgW72oFFtXS9DYm1vpCa84eZfF221oZaXF48iP6B7vAELOWWUUAMWhiTf+Cqo6KW ZNZ3eLGDnIySkrz+MfwPgAQsUn3HvWh206FE7mVczIUDwWTg/s+hUdlRqzerC9ogQYNj ejaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715678057; x=1716282857; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8ko/zdDeSeEhX91x3Fd1MVSbuIaq3dK4kXGVMizIPfI=; b=a09FZi/59MWr3DK5IwiEqEQMc/8QoaNrZ/os4m7Z5Vae2ZoFaOezUgFR0MZDV3a1S0 tJByjfFs8+mxfUHkBL8G1ZZXlDKbc5R2iLA+7BN/F5L0ifsDkQ7W53PIKgsT1xOWiirc nAVjDO+37u5WD91TfQrCnsX1BBZp3h+n4vslhTB1XBt3vdVo+9HgbW91R7Cwn3SYw3tp MO/xKIyQ1guFMcHA3AUb0lzLsDWt3UEltiu2QXHuL5nLsSpp+kU/KBIRYZGCSelqQ4S3 ghRZS3YYxh8sM2mtWF4NvvIWinohP8nB78zq1mvrgUZ9kUPz/CTgrYIJpL4n5pALeRPP qJbg== X-Forwarded-Encrypted: i=1; AJvYcCVexP6tkn8n4wvSZ4QE0SO2cIGL9I53FU9fqvU+4Iorg+tyJToPEKM5lStOWyd+rmN/edjRBgPYT3as8X8OfVG43PYoxIJeXMUA X-Gm-Message-State: AOJu0YxJYydl5OV+u6VNgGuLZdef/au8Ed0CoNhVsPvUADISWYeSgF6b bpf9Gh/+PmvY9wDeLPyBqMt/xR91Bliqqm1QbNBb0q7Upw1xMuPHOKlRejXvpb8= X-Google-Smtp-Source: AGHT+IFjc5fVrzGSpJ/SCt5Op/7mIZRPyoNoj0gzGk7t3OcjW8y+LixVm36I2bwwJQHpaD8QRsQp1w== X-Received: by 2002:a05:6512:2310:b0:51b:9254:91e7 with SMTP id 2adb3069b0e04-5236e7185abmr1302439e87.61.1715678057360; Tue, 14 May 2024 02:14:17 -0700 (PDT) Received: from [10.91.0.25] ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a813cd3dasm74656766b.45.2024.05.14.02.14.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 May 2024 02:14:16 -0700 (PDT) Message-ID: Date: Tue, 14 May 2024 11:14:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Halving the number of recursive calls To: Xi Ruoyao , Viktor Reznov , Carlos O'Donell , libc-alpha@sourceware.org References: <3f8f8f3a-6c54-4b94-a666-001150ebbb32@redhat.com> <2608026cbd3b9624dfa0d925cb59df61ac176492.camel@xry111.site> Content-Language: en-US From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <2608026cbd3b9624dfa0d925cb59df61ac176492.camel@xry111.site> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 14/05/24 08:08, Xi Ruoyao wrote: > On Tue, 2024-05-14 at 08:27 +0300, Viktor Reznov wrote: >> On Mon, May 13, 2024 at 5:14 PM Carlos O'Donell >> wrote: >>> Lastly, How did you test the performance gains? >>> Does this change show up visibly in a microbenchmark or workload? >> >> Even if a compiler is capable of doing "partial inlining", it is >> better to do this inlining manually. > > No, in Glibc if we are pretty sure the compiler will optimize it, we > don't optimize it manually. > > It's not really "better" unless a not-so-old GCC or Clang fails to > optimize it, *and* the optimization really makes it faster for > microbenchmark or workload. > Kuan-Wei sent a similar optimization some time ago [1], which I complete forgot to install. My plan is to re-run some tests and apply, so how this patch compare to Kuan's change? [1] https://sourceware.org/pipermail/libc-alpha/2024-March/155648.html