From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: Resizing hash tables in Guile Date: Thu, 13 Feb 2003 15:02:38 -0500 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1045166550 32114 80.91.224.249 (13 Feb 2003 20:02:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 13 Feb 2003 20:02:30 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18jPYf-0008L2-00 for ; Thu, 13 Feb 2003 21:02:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18jPaP-0005EW-0B for guile-devel@m.gmane.org; Thu, 13 Feb 2003 15:03:57 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18jPZW-0004t2-00 for guile-devel@gnu.org; Thu, 13 Feb 2003 15:03:02 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18jPZE-0004ao-00 for guile-devel@gnu.org; Thu, 13 Feb 2003 15:02:46 -0500 Original-Received: from multivac.student.cwru.edu ([129.22.96.25] helo=multivac.cwru.edu) by monty-python.gnu.org with smtp (Exim 4.10.13) id 18jPZ8-0004Rp-00 for guile-devel@gnu.org; Thu, 13 Feb 2003 15:02:39 -0500 Original-Received: (qmail 31215 invoked by uid 500); 13 Feb 2003 20:03:00 -0000 Original-To: Joris van der Hoeven , Greg Troxel , djurfeldt@nada.kth.se, guile-user@gnu.org, guile-devel@gnu.org, Marius Vollmer In-Reply-To: (HJSTEIN@bloomberg.net's message of "13 Feb 2003 13:30:58 -0500") Mail-Copies-To: nobody Mail-Followup-To: Joris van der Hoeven , Greg Troxel , djurfeldt@nada.kth.se, guile-user@gnu.org, guile-devel@gnu.org, Marius Vollmer Original-Lines: 23 User-Agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 (i686-pc-linux-gnu) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:1932 gmane.lisp.guile.user:1651 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:1651 HJSTEIN@bloomberg.net (Harvey J. Stein) wrote: > Joris van der Hoeven writes: >> inserting requires looking up too. > > Yes, if you want to return an error for inserting 2 items with the > same key. Or if you want to replace existing entries, as Guile's current hash tables do. >> But you need a compairison operation for that, >> which may be even less natural than a hash function. > > Yes. For hash tables you just need a key equality test. For trees > you need to be able to order the keys. It's easy enough to support this: (< (hash key1 0) (hash key2 0)) But this is probably only useful in the general case. It should be possible to substitute a less expensive ordering function when one is available. paul _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel