From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: Does anyone have a better scm_string_hash ? Date: Mon, 17 Nov 2003 17:29:48 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87n0avq7pf.fsf@zagadka.ping.de> References: <8765hnf308.fsf@zagadka.ping.de> <1068823738.13123.54.camel@localhost> <20031114155148.GI16650@powergnu.laas.fr> <1069058032.1638.21.camel@localhost> <874qx3rogk.fsf@zagadka.ping.de> <87u153q8yk.fsf@zagadka.ping.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1069086890 20514 80.91.224.253 (17 Nov 2003 16:34:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Nov 2003 16:34:50 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Nov 17 17:34:47 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ALmKt-0003jO-00 for ; Mon, 17 Nov 2003 17:34:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ALnHK-0008NX-HH for guile-devel@m.gmane.org; Mon, 17 Nov 2003 12:35:10 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ALnHA-0008Mo-6y for guile-devel@gnu.org; Mon, 17 Nov 2003 12:35:00 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ALnGc-00085s-Pa for guile-devel@gnu.org; Mon, 17 Nov 2003 12:34:58 -0500 Original-Received: from [195.253.8.218] (helo=mail.dokom.net) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ALnDa-0006nW-C6 for guile-devel@gnu.org; Mon, 17 Nov 2003 12:31:18 -0500 Original-Received: from dialin.speedway42.dip10.dokom.de ([195.138.42.10] helo=zagadka.ping.de) by mail.dokom.net with smtp (Exim 3.36 #3) id 1ALmIr-000692-00 for guile-devel@gnu.org; Mon, 17 Nov 2003 17:32:42 +0100 Original-Received: (qmail 25638 invoked by uid 1000); 17 Nov 2003 16:29:48 -0000 Original-To: guile-devel@gnu.org In-Reply-To: <87u153q8yk.fsf@zagadka.ping.de> (Marius Vollmer's message of "Mon, 17 Nov 2003 17:02:43 +0100") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3043 gmane.lisp.guile.user:2400 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2400 Marius Vollmer writes: > Just for kicks, I'm now going to see what kind of code GCC generates > for h*37 as compared to (h<<5) + (h<<2) + h... Interesting. For h = a + (h<<5) + (h<<2) + h we get this sequence (one line is one machine instruction): x = h x = x << 5 a = a + x a = a + h*4 h = a + h and for h = a + h*37 we get x = h + h*8 x = h + x*4 h = x + a*1 which is nearly twice as clever... -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel