all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Recent changes to add-to-list
Date: Mon, 30 Oct 2006 08:33:10 -0500	[thread overview]
Message-ID: <E1GeXGI-00022w-58@fencepost.gnu.org> (raw)
In-Reply-To: <85ejsrlaww.fsf@lola.goethe.zz> (message from David Kastrup on Sun, 29 Oct 2006 10:38:07 +0100)

    The main problem I have with this is that it incurs additional runtime
    overhead even for the default case, and even though the comparison
    function will be function almost always.

It is not in a loop, so it won't take a lot of time.
I think it is insignificant.

					      So I would think it more
    reasonable to add separate functions, add-to-listq, add-to-listql and
    add-to-list-whatever.  That is verbose on obarray, but does not impact
    the general use case.

That would be really ugly.  Do you have a case where the slowdown
is really a problem?

    Note that this walks through the entire list even if the first
    comparison already establishes the presence of a list element.  That
    is very bad, since that is likely the most common use case.

That is a real slowdown.  Since you've written a fix,
would you please install it?

  parent reply	other threads:[~2006-10-30 13:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-29  9:38 Recent changes to add-to-list David Kastrup
2006-10-30  1:05 ` Stefan Monnier
2006-10-30 13:33 ` Richard Stallman [this message]
2006-10-30 22:48   ` David Kastrup
2006-10-30 23:05     ` Nick Roberts
2006-11-01  2:13       ` Richard Stallman
2006-11-01 16:39         ` Stefan Monnier
2006-11-02  4:43           ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1GeXGI-00022w-58@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.