From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Native compilation by default?: Was [Re: stats say SBCL is 78 875 % faster than natively compiled Elisp Date: Wed, 22 Feb 2023 14:32:24 +0200 Message-ID: <83ilftswx3.fsf@gnu.org> 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> <871qmj7z9e.fsf@dataswamp.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21627"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 22 13:32:43 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 1pUoId-0005Rf-3P for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 22 Feb 2023 13:32:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUoI9-0003zM-HT; Wed, 22 Feb 2023 07:32:13 -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 1pUoI7-0003z3-Tu for help-gnu-emacs@gnu.org; Wed, 22 Feb 2023 07:32:12 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUoI7-0002Qs-LJ for help-gnu-emacs@gnu.org; Wed, 22 Feb 2023 07:32:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=LnJ2ZTaYbsw0oGntx/br8O1uDmnFM7k6wDaJQKb69XE=; b=r3p8cj4KcRsl FwyXHSN0DIvz3vYQJclAQNmmiqK+9ftjCRa2OSJmmMxnd1JoBc3dCirdCW6ZlTpVJyw/Hz6mUAv7X zb8mJK1ooC50ZoSy0cMyAsvBPuh6PkymxGK4r1JKjiC2hyZb7BjfgqqvTet06TqXzIN2+TltN9p0G XApOE7ki6FQ/IrfrvCJVKJeSMdBDhvkgQqsFdB5kmUiGTJF4tItsm5diYr7Xha0u8s1ErnjLLssOV jJ+SmC9mA4z2tyCinAHLrdYLwcuGadOwdQqTDsv5piYrse2SEHrLaCo5zJ82oWJxk/n3+pAHhJLHz X9CDI/g3Q5uP91H3y/So2w==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUoI7-0000O6-3f for help-gnu-emacs@gnu.org; Wed, 22 Feb 2023 07:32:11 -0500 In-Reply-To: <871qmj7z9e.fsf@dataswamp.org> (message from Emanuel Berg on Tue, 21 Feb 2023 17:35:09 +0100) 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:142809 Archived-At: > From: Emanuel Berg > Date: Tue, 21 Feb 2023 17:35:09 +0100 > > Eli Zaretskii wrote: > > > Native compilation happens automatically when you _load_ a .elc > > file, not when you compile it. > > It doesn't happen when you byte-compile but it also don't > happen when you load it, or that depends what you mean > by "load"ing. I know what I mean by it, but what do _you_ mean by it? > To `load-file' an .elc does not trigger native compilation of > as we have said in this thread (and it is correct), I know > this because all my files are byte-compiled but not all of > them are natively compiled. Again, it depends how do you "load" it. Please show the code or the command you used, in their entirety. > My theory was that it only happens when you `require' the > .elc It happens if you load with 'require', yes. But it also happens if you use 'load'. > possibly it also requires that the file you `require' > from is also natively compiled? No, it doesn't have to. If the .eln file doesn't exist, Emacs will start a native compilation in the background (unless you have disabled it in one of the supported ways). > But then, again, I don't understand how it all starts? Like I said: it starts when Emacs loads a byte-compiled file for which there's no .eln file.