2014-04-08 16:04 GMT-03:00 Pharo4Stef <pharo4s...@free.fr>:
> In VW there is the concept of object bodies and head now we will eventually 
> have that with Spur. Maybe clement explained it somewhere in his blog (I 
> understood the point once and of course I forgot).
>
> Now I wonder what changed so much between 1.2 and 3.0

Dolphin's #become: uses the same concept.

E.g. a become: b
Doesn't switch references, but instead "body" pointers in a and b. It
is, a becomes b, and b becomes a. i

Time microsecondsToRun: [1000 timesRepeat: [String new become: String new ]].
684 898 663 812 665


Also, there is a #oneWayBecome: which DOES an object table scan, and
makes all references to the receiver point to the argument object (it
is, a becomes b, and not the other way around). This gets slow
directly proportional to the size of the OT.

Time microsecondsToRun: [1000 timesRepeat: [String new become: String new ]].
10936532

Most proxies and stubs implementations in Dolphin uses #become:
because it is instantaneous, and the "old" object (b in this)
eventually gets garbage collected.

Regards.

Esteban A. Maringolo

Reply via email to