guile-devel
[Top][All Lists]
Advanced

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

Re: Optimizing record accessors


From: Kevin Ryde
Subject: Re: Optimizing record accessors
Date: Tue, 21 Aug 2007 10:10:16 +1000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

address@hidden (Ludovic Courtès) writes:
>
> Changing `record-accessor' as in the attached file yields

Gets rid of one scheme function call in the normal case does it?

I expect an apply-able smob thingie would be fastest (and smaller too)
for accessors and modifiers, if anyone felt like going down that track.
Probably quite worthwhile on the general principle of getting low-level
bits running fast.

> Type-safety is still guaranteed (e.g., `struct-vtable' will fail if OBJ
> is not a struct), though not as precisely (e.g., instead of a
> `not-a-record' error, we get a `wrong-type-arg' error in
> `struct-vtable').

As long as it's still `wrong-type-arg' it ought to be ok.  If the whole
lot goes into C at some stage then the errors will be easier to control.




reply via email to

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