[Vm-dev] [Pharo-project] Plan/discussion/communication around new object format

Chris Muller ma.chris.m at gmail.com
Mon Jun 11 22:00:16 UTC 2012


(discussion branch moved to Magma list).

Well, I doubt it's faster than just using Avi's regular WriteBarrier.
Understand the overrides are only compiled once per class, not once
per object.  In the real world compilation is not a significant factor
on performance.

The overridden methods follow the pattern:

someMethod
  | t1 t2 newT1 newT2 returnValue |
  t1 := self instVarAt: 1.
  t2 := self instVarAt: 2.
  returnValue := super someMethod.
  newT1==t1 ifFalse: [ self modified. ^ returnValue ].
  newT2==t2 ifFalse: [ self modified.  ^ returnValue ].
  ^ returnValue

which is probably even faster than unwinding stack all the way to the
Immutable handler every time an attribute is set.  Not sure, but the
above is fast enough to accomplish the overall goal and substantially
improve app performance.



> Ok, what if we call it a "fast write-barrier provided by the VM".
> Would that change your view? Igor?


More information about the Magma mailing list