On Wed, Oct 26, 2011 at 1:11 PM, Javier Burroni javier.burroni@gmail.comwrote:
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).
But taking a register away from e.g. the calling convention has costs, especially on x86 (6 user registers).
But what is selfID? Is that the object table index for self, or something related to self's class or?
saludos jb
-- View this message in context: http://forum.world.st/Direct-object-pointers-vs-indirect-ones-pros-and-cons-... Sent from the Squeak VM mailing list archive at Nabble.com.