The cost of write barriers
thedeemon via Digitalmars-d
digitalmars-d at puremagic.com
Mon Nov 3 03:50:54 PST 2014
On Sunday, 2 November 2014 at 10:36:13 UTC, Jonathan Barnard
wrote:
> On Sunday, 2 November 2014 at 10:30:21 UTC, Araq wrote:
>>
>> And I think these are meaningless results. You can see here
>> for instance what a write barrier can look like:
>>
>> http://psy-lob-saw.blogspot.de/2014/10/the-jvm-write-barrier-card-marking.html
Btw, how are write barriers implemented in Go now?
> Would such an implementation also be possible in a language
> like Go or D with internal/'thin' pointers?
Yes, however the compiler needs to know all the places where your
code mutates pointers. That means you can't use memcpy to copy
some data with pointers into an old object or array. And you
can't mutate pointers from C code.
More information about the Digitalmars-d
mailing list