From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Optimising Elisp code Date: Sat, 6 Oct 2018 21:24:57 +0200 Message-ID: <20181006192457.GB7368@tuxteam.de> References: <638fb7dc-6fc5-4645-8793-97a00038a3a8@googlegroups.com> <8hxojvzzzzzz.m4h.xxuns.g6.gal@portable.galex-713.eu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dTy3Mrz/UPE2dbVg" X-Trace: blaine.gmane.org 1538853813 14572 195.159.176.226 (6 Oct 2018 19:23:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 Oct 2018 19:23:33 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) Cc: help-gnu-emacs@gnu.org, Stefan Monnier To: "Garreau, Alexandre" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 06 21:23:28 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8sAh-0003g5-BQ for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Oct 2018 21:23:27 +0200 Original-Received: from localhost ([::1]:40181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8sCn-0001tk-P0 for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Oct 2018 15:25:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8sCH-0001tD-JR for help-gnu-emacs@gnu.org; Sat, 06 Oct 2018 15:25:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8sCE-0003lu-FQ for help-gnu-emacs@gnu.org; Sat, 06 Oct 2018 15:25:05 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:54647) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8sCE-0003fy-4p for help-gnu-emacs@gnu.org; Sat, 06 Oct 2018 15:25:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:Date; bh=8+3zN9/tB3ETFAbvjlbO8UK5YL0oQZpLo1/9dVniii8=; b=AWF3tHCgjKTOvW1KqB4sMGJHCdMVVD3f0pXeevw2ktKNSHeATTVZ08ootFXImv9J/gczzE961iMLyrBJV+C0EJZGOqc/MS/OQyYBNrl6BDg1l/qkV62WvCMXt9wW0VMSCiib4fgjIGPwoD+VafSJuoe7oEa9UMyumgLUyfanMCglKRD2Tnqq3RYJls42u72GwomvaFquAiI4fC8IQzamF8vcoOcbLt2WgRivxMloSlV4VnUD2nuMRsRHqzG0Gc5GjW9l9lSPlE6TagpcCa4Y+GCJKosk5GHq8sHCymoutUHckgIaUJlfvFKK1GuYvtfm2z7fDw3DulAkXniciG3xPQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1g8sC9-00026Z-QK; Sat, 06 Oct 2018 21:24:57 +0200 Content-Disposition: inline In-Reply-To: <8hxojvzzzzzz.m4h.xxuns.g6.gal@portable.galex-713.eu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118166 Archived-At: --dTy3Mrz/UPE2dbVg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 06, 2018 at 06:55:54PM +0200, Garreau, Alexandre wrote: > On 2018-10-06 at 10:40, Stefan Monnier wrote: > >> What you're describing is called inline expansion. > >> AFAIK, the Elisp compiler doesn't do this automatically. > > > > Indeed, it doesn't do it automatically because it doesn't know how to > > (automatically) undo it, and it has visible effects w.r.t advice, > > debug-on-entry, etc... >=20 > Why =E2=80=9Cundo=E2=80=9D? [...] because... - when debugging, you want to know that function "foo" is being called - you want, perhaps, to advice/instrument the function after its entrails have been spread across some other byte code - because you expect it to be possible to redefine the function at run time (the run time system would have to know how to excise the inlined and perhaps optimised bits and pieces and replace them by something else) > Or would =E2=80=9Creevaluate every function that where defined with the > (now-redefined) inlined function inside=E2=80=9D work too? Hmm. Not reevaluate, but recompile, and not "inside", but rather "outside" -- like finding all places where this function was inlined and do some magic there. Perhaps doable, but not trivial. Cheers -- t --dTy3Mrz/UPE2dbVg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlu5DAkACgkQBcgs9XrR2kaOiACeOjbkJ7lbUqLYs6P63Hxb2R0G +9oAn2vcBk02dgRu2t39Yg5u+/733udk =s4O5 -----END PGP SIGNATURE----- --dTy3Mrz/UPE2dbVg--