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: Re: RFC: String interpolation Date: Sat, 10 Dec 2016 11:01:25 -0500 Message-ID: References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com> <9f4dbc5a-7978-8cdb-d8f5-05d853ff4a99@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6VxNQhK6bulTcHRB2xV39LBWEQSG4Dq7O" X-Trace: blaine.gmane.org 1481385708 32455 195.159.176.226 (10 Dec 2016 16:01:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Dec 2016 16:01:48 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 10 17:01:45 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 1cFk5o-0007lI-IE for ged-emacs-devel@m.gmane.org; Sat, 10 Dec 2016 17:01:44 +0100 Original-Received: from localhost ([::1]:52177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFk5r-0001Ac-2G for ged-emacs-devel@m.gmane.org; Sat, 10 Dec 2016 11:01:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFk5h-00019E-S8 for emacs-devel@gnu.org; Sat, 10 Dec 2016 11:01:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFk5e-0000Z1-RH for emacs-devel@gnu.org; Sat, 10 Dec 2016 11:01:37 -0500 Original-Received: from mout.kundenserver.de ([212.227.17.13]:50963) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cFk5e-0000Yi-GJ for emacs-devel@gnu.org; Sat, 10 Dec 2016 11:01:34 -0500 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.184]) with ESMTPSA (Nemesis) id 0MKaOt-1cFShv0xPD-001xMW for ; Sat, 10 Dec 2016 17:01:32 +0100 In-Reply-To: X-Provags-ID: V03:K0:dFrpqMAFdO9nWc0LRaH1JEHz9Mh1Q39Sr1SRlokrm2T/6lmekDa +Pn2Q7a57y/ge36cepJLt9OkhV5ZabhzSyW6LhK5jZihd3WgXD5vxhUmgmCTl8ymH/Mtu6a 4VwZYU5PODIQCpd6ffnaOrAw38CvfggtF7m7gBeU+YyL7Nr8yD7bX+UfqD3meuCwDWvx1N4 KlYXTdEX2viTqrwUmT7vA== X-UI-Out-Filterresults: notjunk:1;V01:K0:bqCKz/+MGFc=:X/iqTXYqT7+33/8y3MjVtE IxQaYER1OUT/zY7agfzVwUG6PqiO13o9Lw8hWvg7H/2Wc0Zaz2XICLSc9sZ1SEiToJljeozjC pPREopScRFFmszFToo1iEE3YF3ZKfzSlkTkclxUpc7RJMqRwM7cy1kNeBTuXcYM7lxHkWv6QN B/yiFKRLUVPGpfzdOu6/vw5gDdXcvYkAGU/jARPn62tW4k5iYropeDHhRwzm5w7e82hIFnWxG Oo32x4nu2P1T10sL6+PPMiMI/EvU/m1vAquqIHvmZRaJ2qIF9VItcIPzxTzZPby6/KX+Aaqpk wU47WW3ttPVWP016ekPGAxxmb5DYtYIeCx4JywEa3HIeWo9Mntorn3DYkipBbscqFcbaf0out CjO8V3feQTKop4vvVGL5G4YC4mPjh5QKbcz1Hb13eE6KidEMKOZPUATbvDLSQWblT7WDIzNBO XajKNiLUEYxB938cKRfDeRGwQB4rAYllvtuVVUkpEBuWKq38t7e/gDw/BJpXFp8fzK/FeFAZ2 p6ZVvlqvg06T/o2b6sZqNKC4ycmiT12wYxUwMlaLTgjD+MsJ6Ra7WUXe+MkfI3QWLvSuq8P/r OiTcE41piuckOLw0TdjmDOvb8Mpu5dAXbCF1fS5HwVVmOZECBUUn8xa/5/t8JXb90V4Dsi+nK n8bpuHLW40c7w4tzmSyh3nfJ4vEwiyJ4dJTixDJ0eLw1itXsS54Cw3gR8h2CGfHdbV7Q= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.13 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:210235 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6VxNQhK6bulTcHRB2xV39LBWEQSG4Dq7O Content-Type: multipart/mixed; boundary="S57P1BAnM1Gkx2O4I5xpCEPwbmn6Xc6NE"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: emacs-devel@gnu.org Message-ID: Subject: Re: RFC: String interpolation References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com> <9f4dbc5a-7978-8cdb-d8f5-05d853ff4a99@gmail.com> In-Reply-To: --S57P1BAnM1Gkx2O4I5xpCEPwbmn6Xc6NE Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016-12-08 16:31, Stefan Monnier wrote: > Indeed. But the Elisp interpreter is slow compared to the `format` > parser, so I'd expect the use of a single `format` call to be more > efficient (both in code size and execution time). That's just a gut > feeling, tho, I have no hard data to back it up (my implementation uses= > a single `format` call partly because of that gut feeling but also > because it seemed easier). Indeed, format seems to be a bit faster: (benchmark-run-compiled 50000 (let ((a 1) (b 2)) (fmt "What's $a + $b? About $(+ a b).")))= =3D> (1.4476880189999999 2 0.11585387999999952) (benchmark-run-compiled 50000 (let ((a 1) (b 2)) (format "What's %s + %s? About %s." a b (= + a b)))) =3D> (1.332636799 1 0.057698191000000065) --S57P1BAnM1Gkx2O4I5xpCEPwbmn6Xc6NE-- --6VxNQhK6bulTcHRB2xV39LBWEQSG4Dq7O 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 iQIcBAEBCAAGBQJYTCbVAAoJEPqg+cTm90wjP5cP/Rksfo2Wz7tgPLzWQLtrOAi8 Y0tOi7EWedi6fUqPxPS04nmI1EKpS2EqYvSS3PSimSumEo0erdPj1lwNA8okZ0Uv kmfEijxXiqt10wnYRp3UoiclRukT2bM/ZUwos27wYQ5EP0baNBYq5C9tnjO3/x7h +LzARH9gZsJboegS7B9yU4hFs7w9ny585dLWEoAUCfn+TLaM6y5hKN8FuQxI4gb/ 2967k592a/c5MWhfhTrwOiJL5f11XazyocmXdaA2OtRnUBJVC6qKAVn5cx4FhiNs 8mfPwpQFK+a1cS7atdqSrJ0QItl3+bCYTuIB+IK6ccsh3w3IWApsaP4O0YzwoIsu QAtoReasGtsYjvAVkoLE5mYE/I9mHkySoHwr+HNrZsvxy8tXYyZMMQt3lW7Zq0KC fvdDKB5WYvY+SGssJgmbPKCyZIAwy7WIs293rjcBpOeIOmf68fINknVrAgqFqt+W Ct2/ZMoJdH6OF5FtAZcWDvmIyWT6IelEEQZcAy1lcq2qX09lLyaxbSTqHiS+UROw Ml/QcWKal+D1c/gKl9938DikvDXzkfVwgAMGpYAhb8qvhgIC9UpfYy2NPZIc8pS5 /VSo1iuZvj1wTy38l0hsCnVku6RG8zTY6sFbMERuEjwxh5aGCjPWbJSW1N1zdP3T ObFesHNv1TLYSnOBh3Gz =DL/P -----END PGP SIGNATURE----- --6VxNQhK6bulTcHRB2xV39LBWEQSG4Dq7O--