[Vm-dev] Re: Direct object pointers vs indirect ones pros and cons

Javier Burroni javier.burroni at gmail.com
Wed Oct 26 20:11:53 UTC 2011


Igor Stasenko wrote:
> 
> the first bench is kind-of 'measure time to access directly to objects'
> the second one is 'measure indirect access'
> and third is measure a loop overhead.
> 
> 

Hi there,
I've just arrived to this thread (thanks to Mariano), and I wanted to share
some speculations: 
Having JIT'ed code with self (the oop of the actual object) in a register,
and selfID (the id of self in the object table) in a second register. 
We have:
accessing ivar: no extra cost
method lookup: 
one extra indirection
sends with MonomorphicInlineCache:
no extra cost if implemented in an instance basis (checking against selfID).
One indirection otherwise

GC (MarkAndCompact):
Faster (due to the removal of the threading process).

saludos
jb


--
View this message in context: http://forum.world.st/Direct-object-pointers-vs-indirect-ones-pros-and-cons-tp3039203p3942123.html
Sent from the Squeak VM mailing list archive at Nabble.com.


More information about the Vm-dev mailing list