From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: [External] : Re: Native compilation by default?: Was [Re: stats say SBCL is 78 875 % faster than natively compiled Elisp Date: Sun, 26 Feb 2023 16:10:57 +0000 Message-ID: References: <87bklw7ka3.fsf@dataswamp.org> <878rgyjgcc.fsf@dataswamp.org> <87o7pq21i4.fsf@dataswamp.org> <87ilfy20jf.fsf@dataswamp.org> <83pma6yahj.fsf@gnu.org> <87fsb21z1n.fsf@dataswamp.org> <83ilfyxiw6.fsf@gnu.org> <83k00btcsl.fsf@gnu.org> <83k005j63n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20646"; mail-complaints-to="usenet@ciao.gmane.io" To: Eli Zaretskii , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 26 17:11:36 2023 Return-path: Envelope-to: geh-help-gnu-emacs@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 1pWJcb-00050n-HG for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 26 Feb 2023 17:11:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWJcG-0000Tm-6T; Sun, 26 Feb 2023 11:11:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWJcE-0000TH-0O for help-gnu-emacs@gnu.org; Sun, 26 Feb 2023 11:11:10 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWJc8-0006s9-M6; Sun, 26 Feb 2023 11:11:09 -0500 Original-Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31Q0tdjF016733; Sun, 26 Feb 2023 16:11:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=OJsYreb+RcLpqm3fgs6NQwR9aZ+dV785+fiLCC27CNc=; b=0zgcN0pONO5pK7oxH/B6fMjeY38lijBkO1F0mmCO9i+yoR4N2VBwfvGbRFNnq48693dl ORK7iCbmKgcbhW0KF4tDPU9C2vCSVx4y/ZNi/7Ai2AYvhSplxIdAd9GMKCXfr/zfHm49 d8GGZyIRnoiKN8klWHjcNVrNVcCKIRLYuSy/j6dzbJAeRQ4bFzZ8+eMeBCAKfikv2MYW vHnVo1ybH+N3JFJWSg6E8g9SKWrqiu9nvM9SroHandzYppGNOk4U6ClaGZcB/DTt34Ky XJEhSSwE/igEy7YmRZiMQAXRvyzTNTPxblT0mWED5IsIHE8cX2XAEvkz4BALw51LGsC8 Qg== Original-Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nyb6e9sej-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 26 Feb 2023 16:11:01 +0000 Original-Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31QEhm1M032918; Sun, 26 Feb 2023 16:11:00 GMT Original-Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2172.outbound.protection.outlook.com [104.47.59.172]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ny8s4cwm5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 26 Feb 2023 16:11:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wgz9aY+1IqmmS8bikHZq7sN8GcSA3B5DJTyQRf5NFp940P5FEu1+MzoFZJwmwcU6ybdb6Waa9cNGAZNJ35eqnOL0vbgyYUTC5jILdmbpSAluNfZVV6MdWpO4crrJ7CFxrk92C9t2eOXxSYZMJdRfndssazwbURawdwQrkjJ0v9nvpzSeb6TNdvTbDKHpONXu2vqJdrHBpVcxCmJ1u2lvfD0ZVdc6e+/hryw1uso76gh8LCfJIXiftJk7sjEzVT4/AVnWkKkKGPwaoV33DiVOQDp4ebYHHS3B3Gkl40gYYntJgrMw9mg56WGA2bO+ya9l0wal6Mxah7Jo+gfQPBbZhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OJsYreb+RcLpqm3fgs6NQwR9aZ+dV785+fiLCC27CNc=; b=g0OD8+8vQIby62yDlEyIAv70ngX8J2I4TTakk7UnTvkzD8iDWZ+3G1eFtB5W9Fb3AlvgMOyD03/3k58+yF5qVCf9ZeW7RerOUtjhttDqCdTV7tMsCYSAwrsYhHcJcF4GrdeNzzT192cJl+ywmAwsOKBOaUPCAtZkfH/LUSxCatwCCoprUPCl2Xaygr0XtUHKUYJaa7HwrNNBAvB0t04hiqISQiMFffMCHwm2ykHSPtBvsuQbcbDqHuQa2vv6B3jusrNq2Lwe6Xfd4uTyPcQ5y+qflWugttCREDf2BlYQcToCfE0ncsSc4YQxgNShJ4aDsbr8KOdjKj55PxnN4Hwg2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OJsYreb+RcLpqm3fgs6NQwR9aZ+dV785+fiLCC27CNc=; b=Ze4O+evu3r6z6CUeGUxM0XY+yjj1i700vxRAdhvlyC6nnoMJTmHydie0zxg97PSNDeIwQjeb1v8hmPAe7xUKoAEeSup+S9V+n0cqy2CzEXmtpR/dY3OFmv27CY6K9Lt4JPVcvdiwo7Fp7pMgrMn5VLm+fQ724V/1LuUiLnlX+3A= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SN7PR10MB6644.namprd10.prod.outlook.com (2603:10b6:806:2af::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.14; Sun, 26 Feb 2023 16:10:57 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::32a3:707b:94c1:6e29]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::32a3:707b:94c1:6e29%9]) with mapi id 15.20.6156.014; Sun, 26 Feb 2023 16:10:57 +0000 Thread-Topic: [External] : Re: Native compilation by default?: Was [Re: stats say SBCL is 78 875 % faster than natively compiled Elisp Thread-Index: AQHZSas5x2uFfRDgdkWHsQKvCUP+uq7hXcsg In-Reply-To: <83k005j63n.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|SN7PR10MB6644:EE_ x-ms-office365-filtering-correlation-id: cf40eb7e-f85a-4c79-e09a-08db18140bae x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yimbGpz0x3hyfRXtRS5Wlgzp+iuPKK5K/gNI7jJVPgX68nyTuexWoHhYzWowxcvWm37U9FOOEodNwMvp88tXnMpZ+0dYlt9ZTuHorj6nazAXmqx2/JhfUJDlhL/uPpe+9NU7Gc3aX6zWKofGjTklPni3rXzDzVLqrSMGQVrRMumFhiu69pt7mLSNNcjy2+e0D+3SOT2oOIFOgWUE9CS4wh1GR3JJL6uMkR2A/8Jds6vCCFrb2zaPMgCuEpJd6MRoKY8AgHVC6ImplQSlB8BQsAU0zHeJ6EMKl0K8XuP/r1Q8ZJ11ZRKy847PYSZCoGSf341HZWh0tR9HWMahVXi6kb6x8v6pY2nAjvtGPyXyMFJneBbRTizJtUxEghF/UgZ59UhlV0QtPUrdJTFnf5GvBsqSfFSkX4jP6ZesTbmNpferfk2qZ+ufTeoqZIbChEnIG1kVmFyt8swE3rBa+YGVuYiJ8gIb8V2ZvLgK1DnIwRXu73wbvdFlC45SuL7YFg9zffl2VQy9RMbfQHOG6naXPjJndtqitsEz3xAr9HXYtdNLrwMjwW/QrGz4czKQXmaI/QmgVnt/eRjQXr8i0lXA++9opCgfZJpojJVk7S72rMWSroV80Z8SFcsT21uTxX8ceWXUPeXEwq7VHhBOqCo7MZ4T4yRmtQl7ie1C0w5yyIOdR+bHKYPFJnyMKiX7ESosvg0Q0MO8nXV9TVU5cB6HNA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(366004)(39860400002)(136003)(346002)(396003)(376002)(451199018)(8676002)(122000001)(38100700002)(86362001)(8936002)(5660300002)(478600001)(55016003)(33656002)(38070700005)(186003)(26005)(6506007)(66556008)(66476007)(66446008)(64756008)(7696005)(2906002)(71200400001)(44832011)(66946007)(316002)(76116006)(9686003)(41300700001)(450100002)(52536014)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?A1WtImmM3iKShSeBDVCBdaIT6ECbwlIeAsRKH//HNag+r6fJ+gFluvaN2Gqd?= =?us-ascii?Q?JEeZYGN3hKnIW4sNTSEFrWVhF7qqncnpBGIBeuhx7IHonpswE+q7jVUpRqSq?= =?us-ascii?Q?hiDPv+fHLsG1XT2tc2MDz2HyObET5PloSpjthjI/1VE/BZFaj9FjZPtD+2za?= =?us-ascii?Q?N7cCk4J48yazcqtqK/hoYuXqVAW2850gbvjkMlOF1i4jjo9rTIdLyXkJe/8J?= =?us-ascii?Q?IJ//BNZSVBONzuCf7+Dz8QPaSlxV1eO0qvVT/Q0mhPi9xbP5L5Ks7x+svtcB?= =?us-ascii?Q?Q8a0ygyj4RL3EVR5g7rzjbSGmDWdi+9rMZtuMScEgrugWdRStpfyBamPL9U9?= =?us-ascii?Q?kXxk7i3QV02eP7rh/fdhcAVrB2gqdzKJT3H+0Wblz41Y4y1aIAYEWo5cvLoI?= =?us-ascii?Q?Nye4+MsJ9U0jBYtHeUV5v28WOnrGdDtL0ESF6ZDa/ROCi3Q6xJoPgUKJ/g5L?= =?us-ascii?Q?5fzCdrAkyaUhWjiRTXan5ydPmmcDTTjX4PRcny/j/HK4DuJyoZVFbBYTBk3u?= =?us-ascii?Q?iU5NIri54+NxRT8/27Knzj6njzvOVBXJuVs9JTvnFONqyk/P9QRO9H0qEZqg?= =?us-ascii?Q?aC14XPkzPqMkeOIkp+qxVapV+ww/44ee0aed7RQm/O3ln1bk9+SbBKw1GSTW?= =?us-ascii?Q?kV X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: doqzyxpSqhsdmX23oUvU0+UIlqeK/yEDGtnxVM+KorKQ/dcnn2G6SXrYBzv6FF93St8AXCpAmxUI/mLRD96p6x11eaA+CcGvv2UEe1nJntN4OdCsyqBUmcSabKnYtULh+b5lW/c0DvTqJX7gXBQLzhfLJOLdsJbz6uO8dxhXHQaocG1mGK/PC3IbEN/SJ0NvMiDU89rr2YV9U+GqBKyNgh57mKUeDfil4ot9mKintABWLsKtl8+BYVyGBU3fLZIS0Yof4Q277MyFn1nD3NYAcn/sCu885gy+ziw7xQr7AU+O1ooWL7o3Jkd8LXgpusz7c0+sMgM2143gdK3E0Te5OCNMnwXf/1ZnUbRCBZTojyDGi2MRVN/q33dNsXztNrBLsaNQnKR10qWe+9ABpWTdjXgyffAuYzfmuZQD+jjCcqQoIoTFBWQDN538eAb2RdXDjRRzVwOiA2X9SC0/ZC+e1fQZyrwHiFEdgJHxZ2GQCkVSAWTMBM2cqHmLRUqvpOSSVlBQaI3ad/oQIEy+zohkHFjeZAoUVxaxTXbis7SorPMzrFAFqoGrFpVCsVme2P5MeW1Y42Pe1rsUj9hclRQ4TlKCpXU+g6bq3+cclAZsqiClFpKCRXV/5cVtvmB6zcpQhEddxwVvQAfYwbaFPvA1YGPiHGWaxtpC1IEwprHDS8zHLpqguyxJNXXFMNMoxgZxveQ6ZCIGlbtXlK7zs/34eJVqJHn20b7kaVDGwqq42v3wSr izIVbyPf+HjG21pDjj X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf40eb7e-f85a-4c79-e09a-08db18140bae X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Feb 2023 16:10:57.7323 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ke17x0Oybz/fIRluWOlUWLnJPHRIu/MbMC6rb10BjbGNZ0/RRl9Rit4EmdLQZt0exxMcqYfAu3adUOOh+0d+eA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR10MB6644 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-26_14,2023-02-24_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=974 phishscore=0 bulkscore=0 spamscore=0 suspectscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302260133 X-Proofpoint-ORIG-GUID: WZr9T5PuaXeLGBV86dozhcm3wdfTCDBu X-Proofpoint-GUID: WZr9T5PuaXeLGBV86dozhcm3wdfTCDBu Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142849 Archived-At: [Caveat: I haven't read the doc and am not familiar with native compilation. Just commenting on what I see written here (which is without context). If what I say helps, good; if not, please ignore.] > > "Native-Compilation is implemented as a side > > effect of byte-compilation" That says that IF you byte-compile THEN, as a side effect of byte-compiling, native-compiling also happens. Actually, that statement doesn't really say that so definitively. It could be that the side effect doesn't _always_ take place during byte-compiling, but that it does sometimes, i.e., conditionally. But a casual reading will likely assume that native compilation occurs each time a file is byte-compiled. IOW, byte-compile =3D> native compile. The statement _could_ also be read (by assuming that's the _only_ native-compile implementation) as saying that IF you native-compile THEN byte-compiling also happens - i.e., that you can't native-compile without also byte-compiling. IOW: native-compile =3D> byte-compile. It would probably be a good idea to _spell out_ exactly the relationship. The statement as is tries to pack too much into the few words "is implemented as a side effect of". > It goes on by saying >=20 > Thus, compiling Lisp code natively always > produces its byte code as well (See above. That's the "_could_ also be read" bit, made explicit.) If byte-compiling always native-compiles, say so. If the only way to native-compile is to byte-compile (i.e., that's the _only_ implementation of native compilation, so you can't native compile without also byte-compiling), then say so. > So the above has nothing to do with _when_ does native compilation > happen. It just says _how_ it works: by launching a byte-compilation > and using its by-products internally to produce native code. It doesn't really say all of that. (Maybe some of the rest of the doc does, but not just the snippets shown here out of context.) It certainly doesn't say that you initiate the compilations (both byte and native) by "launching a byte-compilation". And it says nothing about needing to use some by-products of byte-compilation to produce native code. Based on your last statement, a guess would be this: Byte-compilation produces, as a side effect, some things that can (separately) be used to perform a native compilation. Does a user initiate that separate native compilation? Or does it happen automatically when you byte-compile? (This is the first question above: does byte-compile imply native-compile?) Are there other ways to native-compile, besides launching a byte-compile? > if the above would load a .eln file instead, how would > a Lisp program be able to force Emacs to load a .elc file? >=20 > Therefore, when you specify an explicit extension, be it .el or .elc, > Emacs loads that specific file, nothing more, nothing less. Exactly > like '(load "foo.el")' in previous versions of Emacs always loaded the > .el file, even if the .elc file was available. This was Stefan's remark also. It's very important. It fits what Emacs has always done (with *.el and *.elc), and is perfectly logical. It should be pointed out explicitly in the text about native compilation and byte-compilation and loading. HTH.