[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Performance improvement for R6RS records

From: Julian Graham
Subject: [PATCH] Performance improvement for R6RS records
Date: Sat, 18 Sep 2010 20:20:45 -0400

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 had every record be a distinct struct type identified
by its own vtable, in which the first two slots were used to store the
record's type descriptor and a pointer to a parent type; this meant
that simple type predicates and mutability checks required (expensive)
examination of the vtable layout.

The attached patched changes the way record data is laid out, such
that all records are of the same struct type, which holds the type
descriptor and parent pointer, as well as a reference to the field
data, which now lives in its own struct.  Some naive profiling, in the
context of the test suite for SDOM (which makes extensive use of
records), indicates a speedup of around 40%.

Any questions?  Would someone care to review before I push?


Attachment: 0001-Improve-performance-of-R6RS-records-implementation.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]