From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Recent changes to add-to-list Date: Mon, 30 Oct 2006 08:33:10 -0500 Message-ID: References: <85ejsrlaww.fsf@lola.goethe.zz> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1162215397 10215 80.91.229.2 (30 Oct 2006 13:36:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Oct 2006 13:36:37 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 30 14:36:33 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GeXJL-0004aq-Vy for ged-emacs-devel@m.gmane.org; Mon, 30 Oct 2006 14:36:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GeXJL-00072e-HL for ged-emacs-devel@m.gmane.org; Mon, 30 Oct 2006 08:36:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GeXGK-0005X7-LP for emacs-devel@gnu.org; Mon, 30 Oct 2006 08:33:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GeXGJ-0005WP-Sw for emacs-devel@gnu.org; Mon, 30 Oct 2006 08:33:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GeXGJ-0005W8-Al for emacs-devel@gnu.org; Mon, 30 Oct 2006 08:33:11 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GeXGJ-0007eS-8o for emacs-devel@gnu.org; Mon, 30 Oct 2006 08:33:11 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GeXGI-00022w-58; Mon, 30 Oct 2006 08:33:10 -0500 Original-To: David Kastrup In-reply-to: <85ejsrlaww.fsf@lola.goethe.zz> (message from David Kastrup on Sun, 29 Oct 2006 10:38:07 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:61378 Archived-At: 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?