From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Enabling native compilation by default when libgccjit is present Date: Sun, 05 Dec 2021 22:15:58 +0100 Message-ID: References: <83wnkm94oq.fsf@gnu.org> <87y251vdeh.fsf@gnus.org> <87lf11tlzf.fsf@gnus.org> <87r1atrsp9.fsf@gnus.org> <8735n85fa5.fsf@gnus.org> <87r1arskmq.fsf@gnus.org> <87r1arsjpu.fsf@yahoo.com> <87ilw3sjlr.fsf@gnus.org> <87r1ar4mi2.fsf@gmail.com> <874k7nw32n.fsf@gnus.jao.io> <87mtlfasg4.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26992"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: =?utf-8?Q?=C3=93scar?= Fuentes Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 05 22:17:03 2021 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 1mtysX-0006i0-21 for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 22:17:02 +0100 Original-Received: from localhost ([::1]:37060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtysV-0000Py-Fv for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Dec 2021 16:16:59 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtyrh-0008Be-6n for emacs-devel@gnu.org; Sun, 05 Dec 2021 16:16:09 -0500 Original-Received: from mail-vi1eur05olkn2069.outbound.protection.outlook.com ([40.92.90.69]:50304 helo=EUR05-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtyra-0003uP-SE for emacs-devel@gnu.org; Sun, 05 Dec 2021 16:16:07 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SXmpvLhn5cKnfve0A00czOHFJRop7yduGa6Ec0/5hkaEDzGg+5taGXoWrqc99fXaymmzi6ssePRlxT+Cs053n+rhjfsgmlnPkTocjxCsvs3BPu99ZhsiaeakaLKo7DeAE9EdsIWagTipt7tejzcup9IcoAP5hdDO4p2iyqlxsELC/Vs6YegPF60dvi8I0PN3wFfPsO1hj0uRlVZSu+nXf3ul5jKog5IJC8pwjBP1JfGplI+rQb+bkduuAqXk/4kIHglw+96BuC2UFGCtLWpm840cumcmtBL76MM1+Ufz9W9Q8eMuWlD4ehw8somlQbc5jTei6GZ7iQ/Pw0FMyzECPw== 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=582IVMxohRSQ01BQxzmuDLkG1+JvOqujp0+o/QzXJIs=; b=liKxHL7IqIxYxreE/xzuvl8+QY9kwcOsAomNDNLgPAYnrKC3ItytPS6Rsr9eBN0qfPdKDK0/gZM0fVz+ygE11gcz1xRY3L8ZqVJj22RgpbNXBXWmqnZetF7uqjEeVhJ3jmAjMXYelEEOzLX53LLAFe28700QkTJIe+Vxj5zKXaAnt67bAmDcOJQCcz4sewE28f42vdDnuiOKGTr0lbl6MdVb5WphW/ILVs3QNTO3JlsPyF78QJ74jts6yavOfnyr0NG56aPM1BqEziWLUQaEPTJ4EvcrdaRw5Itdg2FlJDhPQ/Z8jMTZAEe3YohdALe0aG6WzQxM961qJvR04N6f7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=582IVMxohRSQ01BQxzmuDLkG1+JvOqujp0+o/QzXJIs=; b=jot1MThkg+EMnao1Zmu8fzwQId2RUdAJQ0r2t0rFxhYenzR+FNUShrMLdBtVb0v0bAaYzJvzQmb0EwTLTamRXio+2L/FnFXV1DpduSbaskN+OLXVT+zIbtatKMjT3lENa4JAbR+EVWCfyuzNfe3qqQLlx4ji5p931kPVfGzHIGd73H3L5wyA2nwBaugf5rpiOb3QfYev6OOoFx5xdrVWDXbqeWNK+G4dqh6+dNHesUocF4gOMUXBcAFPXJntxXBkyBFZcSBJCgXS5YStSp+AwQ4ad5io05n1Z5zi5YqyogFuKy9pVDI3CRal0L9F4WROmUK+cQHeJ+D6PVS2Um/brg== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AM9PR09MB4626.eurprd09.prod.outlook.com (2603:10a6:20b:2d4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.11; Sun, 5 Dec 2021 21:15:59 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b012:5fd9:9447:d64a]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b012:5fd9:9447:d64a%4]) with mapi id 15.20.4755.021; Sun, 5 Dec 2021 21:15:59 +0000 In-Reply-To: <87mtlfasg4.fsf@telefonica.net> (=?utf-8?Q?=22=C3=93scar?= Fuentes"'s message of "Sun, 05 Dec 2021 18:10:19 +0100") X-TMN: [nuYEBkrCqH5EMs51eAyePGWkKf5qNATE] X-ClientProxiedBy: GV3P280CA0017.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:b::15) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87y24yiwhd.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by GV3P280CA0017.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.17 via Frontend Transport; Sun, 5 Dec 2021 21:15:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0c953c12-2fad-41fb-3d25-08d9b8346f44 X-MS-TrafficTypeDiagnostic: AM9PR09MB4626: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /vqwyErJuAFrIASR6fWtzWYJONqYJRtvqC5ECf/xNvoVlZQQG6cRokiOov+2Riyaoh5eSETORxd/d5QsQ4IJLZY+o8IYVXNNpZM10hqlfG8noAnBzSQ9zOc1eZPXSIhkBbgdhNlU7PcSagtRjy+3qrwElrgjB1tVlSMSrQKozscuwtrQFG4V6jdn2o6Vqdg1HTL19vH9mZxlGxYYcBLG4K0z2pqpuuO1g1RDp/Je7gosf6Sln0lQn6EsMav+0y6GF8J612k1aiZ8xuTbAGrrD7KrAvZ7WWUq2AYDg44cblNVZwqlj2qnDhbsORcgsLock/lZKTdheSvi1xUuGrA4fas/LRZfpdn2R02BKbQShkkCYfA+tOzvXhGo7OKIkwVwT9OFLwk6vEPFHrnnk+24h5sZ27xNU8lFnsANkAvCclax/OSztCOj5qLCyzpoEpBRJxsknPPxIP2dnBJw/gB8Zoq26/slpZfDHCQOkP5gx5Mi5ja5otgTpiU4oyPfTuKHtw95rJg7axDBKIfga7/zAK5QGt6gDRq7iZLHKz74oPDkNjAbWUfvi/4h85hbwaoXAET4RHI5Z/Y7+ukxfydfzg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RFkzcWJNK2pWV3hwOGRKQ2c2NitkcUVaRCtNYWFJNmlhVE5zOEttamhCUS9u?= =?utf-8?B?ckZCS05iQ2w5blN1WG9vT09sWCtiREhDT2hxWEl1eWc0alhXeXZPKzV2Kzh5?= =?utf-8?B?aFIreVZzaW9DTW9WcHBJUi82OVNQblZmQ0paUFNtU1lOMElCaHJGMEozcWwy?= =?utf-8?B?TGlYaEVsQ0NzRWVMS2NiMjNVSmZKUE9rdytmQ2xYS1k1R0QxRFVIWG5DRFNO?= =?utf-8?B?NFRaYU8zRkZxb2FVVGM3eU5WRmhSRThJOEhiUis5N2ZZQytTMzhmR1oySkpI?= =?utf-8?B?cmRlN3VUYUdZNCtORlJFbi9DVXptQS81QW8xUnlibnFBTTlJclNrQlVtSjM1?= =?utf-8?B?ZlZkcWxxMzhPNE1aYU43dEdNSVJMWHZuVTZOS1NBa1d5Wk1aRzkzcHhJNnc3?= =?utf-8?B?YVlWcGNwdkJXa2dWai9JNU1RZ1JwMGdGOWxFZ1pRZEsxY2lxT3hyRzhJTzdN?= =?utf-8?B?MjJJWWRBcjdkVm5RMUExYjJndU94SlFRa2FMUXhtZW5pREc0dmhUcFcyOFpX?= =?utf-8?B?dXFIby9wcnpUaDR2SlZ1ODMzMEFxbTBKVjU1ZzNpeVV5ejY2VlpxMkxyWms2?= =?utf-8?B?SjRua0dIbEFJUlpuTDdUY1p5VlhJSTBTWDFHYkpyQ0RGcm1CNWt5QmtXVGtm?= =?utf-8?B?QlFGOHcvMHA1MGljelRzcnFuNHVsa3J1YXFNQX X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 0c953c12-2fad-41fb-3d25-08d9b8346f44 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2021 21:15:59.7481 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR09MB4626 Received-SPF: pass client-ip=40.92.90.69; envelope-from=arthur.miller@live.com; helo=EUR05-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:281028 Archived-At: =C3=93scar Fuentes writes: > "Jose A. Ortega Ruiz" writes: > >> I'd be curious to know where people are seeing speedups. > > In my experience nativecomp is somewhat noticeable while using lsp-mode. > > Otherwise, not much, if at all. > > The reason for this is not hard to understand for anyone with a little > bit of knowledge about binary code optimization. For instance, if your > Elisp code consists on invoking opaque C primitives, the gain of > compiling it to machine instructions will be mostly irrelevant. Yes of course, I would definitely agree with you. Native comp has nothing t= o do with the C code; and while it does optimization, it is not so much about optimization, but difference between executing machine code vs interpretted= byte code. C core is also not all of Emacs. Emacs itself implement lots of functionali= ty in Lisp code, and packages add usually lots of functionality on top of that. I= f you have lots of packages, some people claim they use hundreds, there is lot mo= re than just executing C wrappers most of time. But as general idea I do agree with you, if all of emacs functionality was = built in C, and Lisp was just tiny wrapper around, there would be no need for nat= ive comp. I also have to admit that I am not sure if I understand correctly *what* is compiled; by what I mean which functions are compiled. As I read original d= ocs on gccemacs by Andrea, in update 1, he says: "Just top level functions are native compiled, the others (lambda included)= are still kept as byte-code." I know that in some later update he said that all lambdas are now compiled too, inclusive anonymous. However I am still not sure what is status on the others. Also I wonder how are cl-defmethods in EIEIO compiled: if they are native (= or even byte-code) compiled? If I understand correctly, they are stored in pro= perty list of their respective cl-generic symbol. For example, Helm is build with EIEIO, so I am not sure if Helm itself is getting much benefit of native co= mp, but I am not sure, just speculating now. It would be nice if someone who ha= s insight can give bit more explanation.