Re: [PATCH] Performance improvement for R6RS records

2010-10-09 Thread Julian Graham
Hey Andy, > Hope that helps, It does, thanks! (It took me a while to internalize the practical implications of struct / vtable equality, although I'd read and re-read the relevant bits of the manual...) Find attached a revised version of my original patch, which I hope reflects what you were g

Re: [PATCH] Performance improvement for R6RS records

2010-10-04 Thread Andy Wingo
Hello :) ;; First, get the set of required fields in a vtable. There should be a ;; better way for this, but there isn't. ;; (define vtable-base-layout (symbol->string (struct-layout (make-vtable "" ;; Now make the vtable for record-types. It has the base layout, plus ;; one more field to h

Re: [PATCH] Performance improvement for R6RS records

2010-10-04 Thread Julian Graham
Hi Andy, > Do you still need some help here? I can try to work up some code to make > an example. Um, yes? If you've got the time. (Sorry for the way-late reply -- I've been distracted with apartment hunting / moving.) Thanks, Julian

Re: [PATCH] Performance improvement for R6RS records

2010-09-27 Thread Andy Wingo
On Mon 20 Sep 2010 09:20, Andy Wingo writes: > Will elaborate later, have to run out the door :) Do you still need some help here? I can try to work up some code to make an example. Andy -- http://wingolog.org/

Re: [PATCH] Performance improvement for R6RS records

2010-09-20 Thread Andy Wingo
On Sun 19 Sep 2010 17:28, Julian Graham writes: >> 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))) >> >>

Re: [PATCH] Performance improvement for R6RS records

2010-09-19 Thread Julian Graham
Hey Andy, > 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? I'm

Re: [PATCH] Performance improvement for R6RS records

2010-09-19 Thread Andy Wingo
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 (>= (s

[PATCH] Performance improvement for R6RS records

2010-09-18 Thread Julian Graham
Hi Guilers, I've been a bit quiet recently since, while waiting for 2.0, I've been rewriting one of my old Guile module projects (SDOM) as an R6RS library. Among other things, this has gotten me pretty familiar with the performance profile of Guile's R6RS records code. My initial implementation