From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: Byte-compiling and lexical scoping for performance Date: Mon, 12 Dec 2016 09:51:07 -0500 Message-ID: <8b40a3f9-9309-ab53-f664-bb6d00f0e29b@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7vsmElq9abpgVf5tTt1jnCIJHHerKRu7F" X-Trace: blaine.gmane.org 1481556649 26894 195.159.176.226 (12 Dec 2016 15:30:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Dec 2016 15:30:49 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 12 16:30:34 2016 Return-path: Envelope-to: ged-emacs-devel@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 1cGSYj-0004io-Q1 for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 16:30:33 +0100 Original-Received: from localhost ([::1]:55438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGSYn-0008B6-Ug for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 10:30:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGRwm-0007xE-J6 for emacs-devel@gnu.org; Mon, 12 Dec 2016 09:51:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGRwi-0005G0-MI for emacs-devel@gnu.org; Mon, 12 Dec 2016 09:51:20 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.134]:53488) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cGRwi-0005FS-Ce for emacs-devel@gnu.org; Mon, 12 Dec 2016 09:51:16 -0500 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.168]) with ESMTPSA (Nemesis) id 0Lyh3D-1cjl492nDT-016AsR for ; Mon, 12 Dec 2016 15:51:14 +0100 X-Provags-ID: V03:K0:88hwfeUhUqRQx8GcKdBLFniK01QBG7a/MzlBA//qWWUhPIhDro6 nGpf9YaNc+9C+xhmRXk0uzzNHIdMPUylIFlvSOLjhvXBuzmfCWrvC6YyeDSRJe+22HgrNQ9 6xnA4M7P1DntHTI+A1ZvjhWMAQf0rWFDsaNJF/mjhtEA4rvhccWzhqcJmqCIp2fEq16aasP h749UGrOPU7i8hwRxPEkA== X-UI-Out-Filterresults: notjunk:1;V01:K0:79lVSKfMDKQ=:zr0m0h3qhg1k3iFfMS7PVN 6oZ5XZdlQJBUedrzkqJBAEkgOjXOYdgsx73ZPqOVXFjgbuFdrUB/KdlHMif9uEGYQzNctG/7t wrmm9NA/ya+V0DeHHRXJrEL1SrXWbbhqEsdMbAf9MHbDUxl+/YgN62Fid5uO96RciNTdOfOa3 zHZA3NHG+WuXySdf6njvbOLdSR4rjjfYIBh0jWj58s5rgjErokFeKkak6Da9KFvmxB4O0WjNr d5fp0IA5/TdlVo/TUsMoW0iSgcg3RAKO9e8M2vEY9s94ngG6e2cVmsWGQVQ7gjWPnT+eBGWTc zfY34kaRzECsNSxO17PaNbYTRz2rr+NokD8Ivg5BzflhR0Gg4+WUYFz761AVnYG8Z1bTqQBBj kW7j9MQArvRTMMAJuQHwhbl/WhfYQv7c4A5nUS63rTHPCEmox9ApxLmKXhfMgMsmpD3LWoo0q LlcRJDt2ZiQ6+ik6T93Hm6I5j4LTaT2dR0acaPOrf+3LxW8THaD0AfwpkXu6pIrMQiFe+3lKU 2+gab2Wc6HrjnKFEJxuCng+5db76iq+RYpBpdSBBGjWvcp3jubUKdXsPr1esmnRfMCAcwnzvr 6lsYAegglsDNdv9doVxSWwf7YvSA8XLGPFaSinKu7VU3taegmWi6ENu6o56+JdAAuIZrJHtmr 99xguZrqSfpD6SuSnrjqQVZYITRewDoAcKFrAypvk/kOdnuP/n8ShTGH8LCmGoxOgoNg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.134 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210339 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7vsmElq9abpgVf5tTt1jnCIJHHerKRu7F Content-Type: multipart/mixed; boundary="TIgweOj1mcXEBbNqNEOTwqReXpTfvuV7N"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Emacs developers Message-ID: <8b40a3f9-9309-ab53-f664-bb6d00f0e29b@gmail.com> Subject: Byte-compiling and lexical scoping for performance --TIgweOj1mcXEBbNqNEOTwqReXpTfvuV7N Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi emacs-devel, The article at http://nullprogram.com/blog/2016/12/11/ is an interesting = read: > Faster Elfeed Search Through JIT Byte-code Compilation >=20 > Today I pushed an update for Elfeed that doubles the speed of the=20 > search filter in the worse case. [=E2=80=A6] >=20 > There=E2=80=99s one last thing to watch out for. Everything so far has = been=20 > compiled with lexical scope. [=E2=80=A6] >=20 > Lexical scope has better performance. Here are all the benchmarks > with the default dynamic scope: [=E2=80=A6] >=20 > It halves the performance [=E2=80=A6] Under dynamic scope, local variab= les > use the varref opcode =E2=80=94 a global variable lookup =E2=80=94 inst= ead of the > stack-ref opcode =E2=80=94 a simple array index. (sending this here and not to -discuss because IIRC we have few examples = of lexical binding being used for performance =E2=80=94 json.el is the on= ly one I remember) Cheers, Cl=C3=A9ment. --TIgweOj1mcXEBbNqNEOTwqReXpTfvuV7N-- --7vsmElq9abpgVf5tTt1jnCIJHHerKRu7F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYTrlgAAoJEPqg+cTm90wj5msQALlTDYNrchiXHGOn8xbVD3jX 1GHDAUVte45t70RYAMj57tPSDJ0JguRPQsz03VZRWJngJCaSX0+EMEeRP4LQKV25 tdL0TAoRMogoDuYJEtoyKh38qc0mm25Lj1GACEdx/x8JCiveaPCFffPZG/uwjSIw ko+PUeuf4osvju99vTSPLAhDqv35n1wIH2blBXGqL/v87V5nts3JzbVO1Bg/g/WT 4qhj8DbdPYS9vW9nJZIkR3jU7g3B921x3FJ5n1zIRS128/a5Bg3lZ+u2SM8Yj3G9 msfOgg0FywHsTIt208Pcrw5rkxPD1y9Lw5H0T3cudCZ65PZPDxIH+fMOFzyUtVoS Qk7QxH5Tcl+BVzksRARCXh30vwOptlSSuLbCtpspemQVJljMQwsBMPkHylvhv1sC uU1RTu4bOgriN2Svy4VLNzc4F//fJpeGoafjN/2A8IfOdZDs6sz4urAIl+BHMc8p RIQW+VIjlWs8KQtOlgWmkpIRnyREgmxTskqf+4t6GL4LwE6/Vqlh63f10nCHPf6Z aPPKFIhJZqCYu0dGmVAlloyvGAumUrNG2MOOAhlEP3GJ8vPDet0WOaZYvJbtB95C KQw71o4DJLSMvYhnmwuMdlFy0yRDS8Ysvk4ChE7j3bXXkc4m4XvXrN7ldlj9q54i Jfui07ebs2UNlZwf39qS =Rx+j -----END PGP SIGNATURE----- --7vsmElq9abpgVf5tTt1jnCIJHHerKRu7F--