guile-devel
[Top][All Lists]
Advanced

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

Re: notes on the goops dispatch implementation


From: Mikael Djurfeldt
Subject: Re: notes on the goops dispatch implementation
Date: Sun, 19 Oct 2008 23:41:10 +0200

2008/10/19 Andy Wingo <address@hidden>:
> I have been going through GOOPS more carefully recently, preparing to
> make GOOPS and code that uses GOOPS compilable, preserving all of the
> intended optimizations. It turns out the dispatch mechanism is rather
> interesting. I write about it here:
>
>  
> http://wingolog.org/archives/2008/10/17/dispatch-strategies-in-dynamic-languages

Thanks, Andy, for your willingness to plunge into this
far-from-perfect code which was carelessly written during a Christmas
holiday as a feasibility experiment.  The idea of the vector of random
values comes from the implementation of CLOS called PCL.  The idea of
caching versions of a method invocation with specialization to
argument types actually used was new to me (although I haven't read
the SELF-article you cite).  As, I think, Neil Jerram has stated
previously, the "vision" is that one could extend GOOPS by taking
advantage of this specialization.  Since every specialized method
stored in the method invocation cache can assume the type of its
arguments, it can also remove a lot of the dispatch within its code.
It's no longer necessary to check if a value passed as argument is an
integer or if it is an object of class Foo.  It is possible to just do
an integer operation or directly access a slot in a Foo instance using
a constant offset.

Best regards,
Mikael D.




reply via email to

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