From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: Inlining policy Date: Mon, 06 Apr 2020 19:17:03 +0000 Message-ID: References: <86tv2h2vww.fsf@gmail.com> <83sghs7qdz.fsf@gnu.org> <83h7y63sjj.fsf@gnu.org> <834ku43c61.fsf@gnu.org> <83k12zz6ds.fsf@gnu.org> <054393f3-3873-ab6e-b325-0eca354d8838@gmx.at> <29a6c120-f260-0ea3-f5e0-1d3dd6323d09@gmx.at> <5752c978-3a13-4e09-18b3-14201eaf1083@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="11772"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: martin rudalics , Stefan Monnier , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 06 21:18:37 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLXGX-0002xI-0L for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Apr 2020 21:18:37 +0200 Original-Received: from localhost ([::1]:37394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLXGW-0006x4-0T for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Apr 2020 15:18:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53001) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLXFL-0005jN-Eq for emacs-devel@gnu.org; Mon, 06 Apr 2020 15:17:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLXFK-0002qK-BU for emacs-devel@gnu.org; Mon, 06 Apr 2020 15:17:23 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:64914) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jLXFK-0002l4-4T for emacs-devel@gnu.org; Mon, 06 Apr 2020 15:17:22 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 036JH387019919 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 6 Apr 2020 19:17:03 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 036JH34c013793; Mon, 6 Apr 2020 19:17:03 GMT In-Reply-To: (Paul Eggert's message of "Mon, 6 Apr 2020 11:26:16 -0700") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 205.166.94.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246560 Archived-At: Paul Eggert writes: > On 4/6/20 11:15 AM, Stefan Monnier wrote: > >> I haven't checked whether it has the same performance impact, and >> neither do I know how it compares w.r.t. "portability/reliability", but >> judging just from the patch, I really like it. >> >> Paul? > > Although I like the idea, it significantly hurts performance with -O0 > (GCC 9.3.1, x86-64) because it causes GCC to emit excess instructions > to save and restore inline function arguments to the stack. True https://godbolt.org/z/rfKxo7 Actually I think moving the lisp_h_* into the functions could also make these easier to debug in case. I find a little odd to optimize for speed -O0, in the end is the exact reason why -Og exists. But I understand there's a trade-off here. Thanks for reviewing Andrea -- akrl@sdf.org