From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Demetrios Obenour Newsgroups: gmane.emacs.bugs Subject: bug#16963: A patch to create a list-with-tail primitive. Date: Fri, 28 Mar 2014 21:46:58 -0400 Message-ID: <1396057618.8469.0.camel@localhost.localdomain> References: <1394200708.1710.4.camel@localhost.localdomain> <5330EDB0.1070406@dancol.org> <1395963445.1956.2.camel@localhost.localdomain> <5334B66A.1040908@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-Yc4sXwmChzmG24MqZFEd" X-Trace: ger.gmane.org 1396057695 8285 80.91.229.3 (29 Mar 2014 01:48:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2014 01:48:15 +0000 (UTC) Cc: 16963@debbugs.gnu.org To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 29 02:48:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WTiNg-0006P2-Vj for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Mar 2014 02:48:21 +0100 Original-Received: from localhost ([::1]:36843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTiNg-0008FT-Jz for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Mar 2014 21:48:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTiNW-0008FI-6y for bug-gnu-emacs@gnu.org; Fri, 28 Mar 2014 21:48:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTiNO-00056v-NF for bug-gnu-emacs@gnu.org; Fri, 28 Mar 2014 21:48:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTiNO-00056k-JE for bug-gnu-emacs@gnu.org; Fri, 28 Mar 2014 21:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WTiNN-0006ER-VD for bug-gnu-emacs@gnu.org; Fri, 28 Mar 2014 21:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Demetrios Obenour Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Mar 2014 01:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16963 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 16963-submit@debbugs.gnu.org id=B16963.139605762423880 (code B ref 16963); Sat, 29 Mar 2014 01:48:01 +0000 Original-Received: (at 16963) by debbugs.gnu.org; 29 Mar 2014 01:47:04 +0000 Original-Received: from localhost ([127.0.0.1]:55267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTiMR-0006D6-Tn for submit@debbugs.gnu.org; Fri, 28 Mar 2014 21:47:04 -0400 Original-Received: from mail-yh0-f43.google.com ([209.85.213.43]:45731) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WTiMP-0006Ca-0R for 16963@debbugs.gnu.org; Fri, 28 Mar 2014 21:47:01 -0400 Original-Received: by mail-yh0-f43.google.com with SMTP id b6so5710951yha.30 for <16963@debbugs.gnu.org>; Fri, 28 Mar 2014 18:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; bh=3VfmplPWpS01JC4XwxiZq3+rqE3zLenurKvATfuQcQ8=; b=JLoD7gMhf5gP0iwHAUKDDvfluV8wWbxdgaCWNPbbfbP3m0tC3e9GL/f4P80k0zFqu9 SGpGwtgt9SEtGNe0EZjXYc2+JyID7adX5Y/1VT+9We8R5EGCITY3/EOrdxtCJz8UuhqM WNrILEIh//jM06Bd4FnUo0dJG5m5vsBBFRYoGCEPJUnjzapUYKqToUqXTtlsoAndCBxq s42q8ijl09ZujLfZ7yx8NxIqpgvcVbYQipEMYy5sf+yeXq+D9ycsnlHLp57QPpmGlV63 UeesHl7enLmiDyMvJblX9h6FVGsQniLRc5QREv8UUoFhgW8WYUHKZ2C9eo3NraKEl9v5 NlvA== X-Received: by 10.236.206.7 with SMTP id k7mr16587728yho.84.1396057620397; Fri, 28 Mar 2014 18:47:00 -0700 (PDT) Original-Received: from [192.168.200.131] (c-71-236-63-161.hsd1.tn.comcast.net. [71.236.63.161]) by mx.google.com with ESMTPSA id s6sm1775562yho.45.2014.03.28.18.46.59 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 28 Mar 2014 18:46:59 -0700 (PDT) In-Reply-To: <5334B66A.1040908@dancol.org> X-Mailer: Evolution 3.10.4 (3.10.4-2.fc20) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87506 Archived-At: --=-Yc4sXwmChzmG24MqZFEd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Thu, 2014-03-27 at 16:38 -0700, Daniel Colascione wrote: > On 03/27/2014 04:37 PM, Demetrios Obenour wrote: > > On Mon, 2014-03-24 at 19:45 -0700, Daniel Colascione wrote: > >> On 03/24/2014 07:10 PM, Stefan wrote: > >>>> Since a comment in backquote.el said that backquote-list* needed to be a > >>>> primitive, here is an implementation of it as one, under the name > >>>> list-with-tail. > >>> > >>> I think it would make more sense to call it `list*'. Also it might make > >>> sense to change backquote.el so it uses this `list*' (tho probably only > >>> when passed with enough arguments). > >> > >> Agreed. On more that one occasion, I've wished we had a CL-less `list*'. > >> If you do add this feature, please make sure the existing list* compiler > >> macros keep working. > >> > > What about just deleting these compiler macros, and making cl-list* an > > alias for list*? > > > > There seems to be little point in keeping them if list* is a primitive. > > The new list* doesn't have an opcode, but cons does. > Good point! My testing showed four nested cons calls to be much faster than list* with five arguments by several dozen times. Maybe list* should be a macro instead? --=-Yc4sXwmChzmG24MqZFEd Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit
On Thu, 2014-03-27 at 16:38 -0700, Daniel Colascione wrote:
> On 03/27/2014 04:37 PM, Demetrios Obenour wrote:
> > On Mon, 2014-03-24 at 19:45 -0700, Daniel Colascione wrote:
> >> On 03/24/2014 07:10 PM, Stefan wrote:
> >>>> Since a comment in backquote.el said that backquote-list* needed to be a
> >>>> primitive, here is an implementation of it as one, under the name
> >>>> list-with-tail.
> >>>
> >>> I think it would make more sense to call it `list*'.  Also it might make
> >>> sense to change backquote.el so it uses this `list*' (tho probably only
> >>> when passed with enough arguments).
> >>
> >> Agreed. On more that one occasion, I've wished we had a CL-less `list*'.
> >> If you do add this feature, please make sure the existing list* compiler
> >> macros keep working.
> >>
> > What about just deleting these compiler macros, and making cl-list* an
> > alias for list*?
> > 
> > There seems to be little point in keeping them if list* is a primitive.
> 
> The new list* doesn't have an opcode, but cons does.
> 
Good point! My testing showed four nested cons calls to be much faster
than list* with five arguments by several dozen times.

Maybe list* should be a macro instead?

--=-Yc4sXwmChzmG24MqZFEd--