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

Stefan Marr smalltalk at stefan-marr.de
Thu Jun 14 16:43:17 UTC 2012

On 14 Jun 2012, at 18:03, Igor Stasenko wrote:
> Sure. Because we're talking about object format design. I just not
> sure that benefits of immutability so great that they outweigh the
> performance overhead.
> And i thinking we should not stop looking for better solutions.

If performance is your main concern, then do not implement it with a header bit, but use what your hardware provides you with: memory protection.

That will make your GC more complex, but if you move all protected objects onto the same page, you can make it read and/or write protected.
In case it is only write protected, reads will be as fast as for every other object.

If you write to it, you'll have to catch a signal, and can propagate it to the language level. To write such an object, just map the same page again at another address, with a nice offset and redirect the writes there.

I don't think such a solution will make the VM maintainers lives a lot easier, but at least you wont have to suffer your performance hit. And you will not actually need a header bit either...

More inspiration here:

 Ribbons: a Partially Shared Memory Programming Model

Best regards

Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
Phone: +32 2 629 2974
Fax:   +32 2 629 3525

More information about the Vm-dev mailing list