Accessing variables through sending messages
Colin Putney
cputney at wiresong.ca
Tue Jun 21 22:22:30 UTC 2005
Andreas Raab wrote:
> Colin Putney wrote:
>
>> I'm liking the sound of Tweak's approach here. I imagine it's the kind
>> of thing that Exupery could optimize nicely, so it could perform very
>> well, but it would also be more dynamic than the current offset-based
>> system.
>
>
> Depends on how well Exupery does adaptive inlining. But if I had the
> choice I'd opt for more send performance before dealing with adaptive
> inlining - with an average of 300 cycles per send there is a lot of room
> for optimizations and optimizing sends in general would help out many
> other areas.
Agreed, which is why I like Tweak's approach. The key to optimizing
Smalltalk is making sends fast, and if inst var access is just another
send, that gets optimized as well. Exupery seems to be moving along
nicely in this area - PICs are already done, and adaptive inlining is
just the ultimate optimization of a send: remove it entirely.
In fact, Bryce's recent work on compiling specialized primitives seems
like just the ticket here. He can generate inlined, class-specific
implementations of #at: which have the offsets figured out at compile
time. I suspect that accessing named instance variables would have a lot
in common with that.
Colin
More information about the Squeak-dev
mailing list
|