From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Merging native-comp and pgtk Date: Sat, 13 Feb 2021 08:41:45 -0500 Message-ID: References: <07D5E64D-DAD0-45B3-B272-627A73D7CBAE@gmail.com> <87pn1erewq.fsf@gmail.com> <87wnvlecrw.fsf@gnus.org> <83sg69o3av.fsf@gnu.org> <87mtwhctte.fsf@gnus.org> <459A0475-E3E7-4159-82DF-93809CCF1E24@gmail.com> <87eehng52n.fsf@gnus.org> <87mtwbye5b.fsf@gmail.com> <87czx7ycva.fsf@tcd.ie> <87eehmyalr.fsf@gmail.com> <877dneoewi.fsf@tcd.ie> <875z2yy6z7.fsf@gmail.com> <878s7twq2t.fsf@gmail.com> <84adc238-c424-bb6b-da28-c4232172da5b@gmx.at> <87wnvcrze8.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38525"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Andrea Corallo , "Andrea Corallo via Emacs development discussions." To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 13 14:43:13 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 1lAvCa-0009tA-4M for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Feb 2021 14:43:12 +0100 Original-Received: from localhost ([::1]:41816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAvCZ-0001Ft-6Z for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Feb 2021 08:43:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAvBL-0008PW-Ub for emacs-devel@gnu.org; Sat, 13 Feb 2021 08:41:55 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAvBJ-0004PK-Qk for emacs-devel@gnu.org; Sat, 13 Feb 2021 08:41:55 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 505B7440A2C; Sat, 13 Feb 2021 08:41:52 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C2DAC440B7C; Sat, 13 Feb 2021 08:41:46 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1613223706; bh=jWSAYOOPh/7O/lPMhZTNn73MI4tsITYQTPzHNj++1bI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=N3cJtLIBkrOylun1C8UjJ0zao12p8I+ygDX49Eag2BrTvUfpQeeosg+yiAuQk4Wv1 OSdhXY3h25QD8W8+DLqkdd32TSPogvhDS7H7bcQTe8kukYzdlr7s18bL8mdlRtMDcL aPu7ROym04sud1wEoH+dxPxGExsr9JLJfG4uld+AGio7gP8lJDhFC+N4JgCcSwUw6m /YuCN+2TguS5FpA2sce7qby0k1vAaIE2ufpvh/DvadD7ijDNYUA7rhkAZMNN5n0zW3 djC9SVJrmltqV1JoxgmLrXq1r9jBfIz2R1ODOI1qfUhIUt1necEG9dPEhPdt3Es1lH b7hUBLKxAXnGw== Original-Received: from alfajor (unknown [216.154.41.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 863051201FF; Sat, 13 Feb 2021 08:41:46 -0500 (EST) In-Reply-To: <87wnvcrze8.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 13 Feb 2021 12:16:31 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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.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:264620 Archived-At: > I've got one question about how things are compiled that I meant to ask > but forgot: Why is AOT not the default, and why does the native-comp > branch do compilation on-the-fly in the background? There are some important differences between compiling to byte-code and compiling to native-code: - Compiling to byte-code is not transparent. The resulting code may behave differently in the two cases, there are questions like `load-prefer-newer`, the compilation itself is useful to get feedback via warnings (or even failures), the compilation can also have all kinds of side-effects (like an `eval-when-compile` which triggers compilation of something else...), the `load-history` will tell you which of .el or .elc you loaded, ... - Compilation of byte-code is fast. - Byte-code enjoys backward compatibility. None of those apply to native-code compilation. On an under-powered machine like a BananaPi byte-code compilation of the whole of Emacs takes quite a while (order of magnitude around 1h). It's a pain but it's bearable. For native-code compilation the order of magnitude is a whole day, which I don't find bearable, especially since all those .eln files need to be rebuilt as soon as I have recompiled a new `temacs`! Lazy compilation is not a natural by-product of the way native-comp works: it's an extra feature that was added manually because it proved very useful. It can be turned off of course. Stefan