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: [PATCH] Performance improvement for R6RS records Date: Sun, 19 Sep 2010 12:39:10 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1284892574 11977 80.91.229.12 (19 Sep 2010 10:36:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 19 Sep 2010 10:36:14 +0000 (UTC) Cc: guile-devel To: Julian Graham Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Sep 19 12:36:11 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 1OxHFf-0004A0-Vx for guile-devel@m.gmane.org; Sun, 19 Sep 2010 12:36:08 +0200 Original-Received: from localhost ([127.0.0.1]:34347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxHFf-0005cZ-4l for guile-devel@m.gmane.org; Sun, 19 Sep 2010 06:36:07 -0400 Original-Received: from [140.186.70.92] (port=49559 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxHFW-0005c7-CZ for guile-devel@gnu.org; Sun, 19 Sep 2010 06:35:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OxHFV-0005lJ-3H for guile-devel@gnu.org; Sun, 19 Sep 2010 06:35:58 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:61267 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxHFV-0005l3-1W for guile-devel@gnu.org; Sun, 19 Sep 2010 06:35:57 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 94BF6D5A7C; Sun, 19 Sep 2010 06:35:55 -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; s=sasl; bh=qzQQQNlRAeJMXIA10UKdCeV6pNs=; b=XgjXlk JmlqXnJLiZb/gI4uz6PhQB6Wfiqp4VVHHIPWE2/trdTRgB0tsGZ7RjU5Evh7WZPj ndLTAp+e8ZDRDxAATcM6DmM/4YGSW2C0A7ympd9czqv+23Up9LDUEfpHswYsJlFb V9e9Xb59JANvQGSeUn2gGYjOr968/BZrREOU4= 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; q=dns; s=sasl; b=SKrHDpQ7lhZjIVrQJCd6cG+ODQw0i3nm ISfKEMObOpyhQRRQxmsMgUz8qrN/rFLalwe10npU4gOv87LRUxy2nYrfzo9nO87t sTOmcP1BA3q5q4NcBpyhaTZXLZTmmKIjFcIBXyVrq8qj/0c2nbEUJAiIoMZhrb7m dme17IoT0sc= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 80E75D5A6D; Sun, 19 Sep 2010 06:35:54 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [88.17.207.25]) (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 DABFDD5A68; Sun, 19 Sep 2010 06:35:52 -0400 (EDT) In-Reply-To: (Julian Graham's message of "Sat, 18 Sep 2010 20:20:45 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: AE5B8402-C3D9-11DF-84D0-030CEE7EF46B-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:10937 Archived-At: Hi Julian, On Sun 19 Sep 2010 02:20, Julian Graham writes: > (define (record-internal? obj) > - (and (struct? obj) > - (let* ((vtable (struct-vtable obj)) > - (layout (symbol->string > - (struct-ref vtable vtable-index-layout)))) > - (and (>= (string-length layout) 4) > - (let ((rtd (struct-ref obj record-index-rtd))) > - (and (record-type-descriptor? rtd))))))) > + (and (struct? obj) (eq? (struct-vtable obj) record-vtable))) Is it possible to keep the current flat record layout, and change this check to be: (define (record-internal? obj) (and (struct? obj) (eq? (struct-vtable (struct-vtable obj)) record-type-vtable))) What kind of performance do you get there? Andy -- http://wingolog.org/