From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: Optimizing =?utf-8?b?4oCYc3RyaW5nPeKAmQ==?= Date: Tue, 22 Jun 2010 23:54:38 +0200 Message-ID: References: <87k4pqj1pc.fsf@gnu.org> <87eifyhhxg.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1277384542 13356 80.91.229.12 (24 Jun 2010 13:02:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Jun 2010 13:02:22 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jun 24 15:02:20 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ORm4M-0004ty-7G for guile-devel@m.gmane.org; Thu, 24 Jun 2010 15:02:14 +0200 Original-Received: from localhost ([127.0.0.1]:46615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORm4L-0003UF-L3 for guile-devel@m.gmane.org; Thu, 24 Jun 2010 09:02:13 -0400 Original-Received: from [140.186.70.92] (port=36191 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORm3y-0003Rh-3a for guile-devel@gnu.org; Thu, 24 Jun 2010 09:01:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORm3w-0000Ir-Ug for guile-devel@gnu.org; Thu, 24 Jun 2010 09:01:49 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:61126 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORm3w-0008KT-Sz; Thu, 24 Jun 2010 09:01:48 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 2FC34BE45E; Thu, 24 Jun 2010 08:59:44 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=TSGFk29FdU+I VzNKfDMU9wn/oKQ=; b=SEWimEKhc83DP17ci8zaUG/1EAHgx8/0XaES8Q6Vy8YU iGKPQRk6E8Pw9Ssr9ryXvEO0cBZGiZYFKnhx/Il3PbOOBKTtBIe+zJf3MdZ66d1m jhNBK8r3hXvq8QT/KLsiFZcM62QuUcDX2Cp6UTuT7vtVsZ2XAukabjWbljhNm4E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=erBJAg P22aeIhHf+oqy1Nwxf7gYd5RaITo3fXBsmOyKPDAV5tIlpVkcWUTM30NHp/XV4kl agzInyyzkYZu0jV0tENFnzYJB07X0XBriOChFrdC2MOyT47PW62X8UQIgCSxRXUG sAS2F2UZiCni9gYKf+4M//eUGMvipqzD6uZ7M= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 0BA0BBE45D; Thu, 24 Jun 2010 08:59:42 -0400 (EDT) Original-Received: from unquote (unknown [83.32.68.226]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 5315BBE453; Thu, 24 Jun 2010 08:59:39 -0400 (EDT) In-Reply-To: <87eifyhhxg.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 22 Jun 2010 23:32:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: 5AD2C27E-7F90-11DF-88BE-9056EE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10563 Archived-At: Greets, On Tue 22 Jun 2010 23:32, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Andy Wingo writes: > >> Nasty, but OK I guess if you need it. Why not also add a fast path for >> scm_is_eq (s1, s2), or for comparing stringbufs, or something ? > > Hmm yes. Though if there are too many fast paths the whole thing ends > up being slow. ;-) > I don=E2=80=99t expect (eq? s1 s2) and (eq? (string-buf s1) (string-buf s= 2)) to > be common enough to warrant a more specific special case, though. Does it affect your original case at all?. In any event, it doesn't involve a memory dereference, only a branch. It's a cheap check. > Because it=E2=80=99s a top-level program, =E2=80=9Cstring=3D=E2=80=9D is = looked up at each > iteration. Ah, right. Thanks for the explanation :) Andy --=20 http://wingolog.org/