From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Changes in GC and in pure space Date: Wed, 04 Sep 2019 22:56:02 -0400 Message-ID: References: <2010764194.349968.1567637920154@mail1.libero.it> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="189450"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Angelo Graziosi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 05 04:57:11 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i5hxO-000n8u-SL for ged-emacs-devel@m.gmane.org; Thu, 05 Sep 2019 04:57:11 +0200 Original-Received: from localhost ([::1]:41980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5hxN-0002KR-2a for ged-emacs-devel@m.gmane.org; Wed, 04 Sep 2019 22:57:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38773) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5hwa-0002KD-LI for emacs-devel@gnu.org; Wed, 04 Sep 2019 22:56:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5hwX-0004dM-SZ for emacs-devel@gnu.org; Wed, 04 Sep 2019 22:56:19 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18960) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5hwV-0004Zo-IT for emacs-devel@gnu.org; Wed, 04 Sep 2019 22:56:15 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 039A8100C6D; Wed, 4 Sep 2019 22:56:13 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8362B1008A7; Wed, 4 Sep 2019 22:56:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1567652171; bh=SKEcxL5db46jmdWaPQbLdCV2Lsxw5V7Pklz2Kqh72VE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=hjILmYiKGJxwU3/4qzdE2BXFZMaAro8x5AGBCwNlD2b2WrqS+tK2iktrg2ADfNp2R 1vd0obDVhnHv2mntRYrGTsZW1OQMPmgXSWgzHaeIVhmTR6WjgxE+0LSeIN/ncckGES +I00kAJNC2S0tCsjL1w9hYXJKeynx1Wa5Z83lnFdgAM9oU6CCqDq3A0EiN6xnavto6 mb67P8xBYHjSTegjPyxdMP+CHCJM6Umb0Wv9ndtgKY+19uMd8iU11osrDHj6msyhar 4NgDaSbWY2NBLJocbxdCFBpCzg2KrXp5me1P9oKp0ipsTeklJM/s3020w7CQ7EIRKD vczhAYohVedUg== Original-Received: from pastel (unknown [108.175.227.36]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5267E120A2A; Wed, 4 Sep 2019 22:56:11 -0400 (EDT) In-Reply-To: <2010764194.349968.1567637920154@mail1.libero.it> (Angelo Graziosi's message of "Thu, 5 Sep 2019 00:58:40 +0200 (CEST)") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239859 Archived-At: > When I was a kid I was taught that macros are preferable to functions if > these are short, don't use loop etc., and this to save on the cost of the > function call.. also old FORTRAN has 'statement functions'. [...] > Maybe all I learned from Borland manuals was wrong... I don't think we can expect Emacs will be compiled by a compiler comparable to Borland's (these were focused on generating code as fast as possible). Nowadays compilers work hard to encourage you to write readable code and to focus your optimization efforts on algorithmic changes rather than low-level micro-optimization (since these may just as well end up being pessimizations unless you really know what's going on). This said, I'd expect that using macros to perform "manual inlining" can still be beneficial for the case where you compile with -O0 (which is why I asked Paul to still use such macros in a few specific places where it seemed worthwhile: I use -O0 most of the time). Stefan