From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: pure-fns in byte-opt.el Date: Sat, 29 Jul 2017 20:22:40 +0300 Message-ID: <838tj72m5b.fsf@gnu.org> References: <20170725020650.GA12601@holos.localdomain> <20170726010000.GA14292@holos.localdomain> <83o9s75kus.fsf@gnu.org> <20170727023608.GA1895@holos.localdomain> <87zibnuraw.fsf@holos> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1501348986 18119 195.159.176.226 (29 Jul 2017 17:23:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Jul 2017 17:23:06 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Mark Oteiza Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 29 19:23:01 2017 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 1dbVS5-00047W-PW for ged-emacs-devel@m.gmane.org; Sat, 29 Jul 2017 19:22:57 +0200 Original-Received: from localhost ([::1]:52995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbVSA-0001NS-17 for ged-emacs-devel@m.gmane.org; Sat, 29 Jul 2017 13:23:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbVS3-0001N9-Ji for emacs-devel@gnu.org; Sat, 29 Jul 2017 13:22:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dbVS0-0003Cz-Gg for emacs-devel@gnu.org; Sat, 29 Jul 2017 13:22:55 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbVS0-0003Ck-Db; Sat, 29 Jul 2017 13:22:52 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1122 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dbVRz-0000eZ-Dy; Sat, 29 Jul 2017 13:22:52 -0400 In-reply-to: <87zibnuraw.fsf@holos> (message from Mark Oteiza on Sat, 29 Jul 2017 12:43:51 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:217137 Archived-At: > From: Mark Oteiza > Date: Sat, 29 Jul 2017 12:43:51 -0400 > Cc: emacs-devel@gnu.org > > Stefan Monnier writes: > > >> (let ((pure-fns > >> - '(concat symbol-name regexp-opt regexp-quote string-to-syntax))) > >> + '(concat symbol-name regexp-opt regexp-quote string-to-syntax > >> + make-vector))) > > > > Ah, now that makes a lot more sense: make-vector is much less pure than > > string-to-char. The above will cause the compiler to replace > > > > (make-vector 2 ?a) > > > > with > > > > [?a ?a] > > > > so you end with a single immediate vector being re-used over and over, > > instead of having a new vector created each time. > > But reading a literal vector still generates a new vector, no? Why do you assume it will be read?