unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Julian Graham <joolean@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: [PATCH] Performance improvement for R6RS records
Date: Sun, 19 Sep 2010 12:39:10 +0200	[thread overview]
Message-ID: <m3lj6yqapd.fsf@unquote.localdomain> (raw)
In-Reply-To: <AANLkTi=o3E+k2X56vAS6hYjv6LuP0LkAti9vaLF6nJ54@mail.gmail.com> (Julian Graham's message of "Sat, 18 Sep 2010 20:20:45 -0400")

Hi Julian,

On Sun 19 Sep 2010 02:20, Julian Graham <joolean@gmail.com> 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/



  reply	other threads:[~2010-09-19 10:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-19  0:20 [PATCH] Performance improvement for R6RS records Julian Graham
2010-09-19 10:39 ` Andy Wingo [this message]
2010-09-19 15:28   ` Julian Graham
2010-09-20  7:20     ` Andy Wingo
2010-09-27 20:05       ` Andy Wingo
2010-10-04 13:48         ` Julian Graham
2010-10-04 19:09           ` Andy Wingo
2010-10-10  5:46             ` Julian Graham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3lj6yqapd.fsf@unquote.localdomain \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=joolean@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).