On Thursday, 26 February 2015 at 00:36:26 UTC, Walter Bright wrote:
On 2/25/2015 1:50 PM, deadalnix wrote:
On Wednesday, 25 February 2015 at 21:44:05 UTC, Andrei Alexandrescu wrote:
You seeing this completely one sided. Even if write barries make code slower by 10% its a non issue if the GC collections get faster by 10% as
well. Then in average the program will run at the same speed.

Hmmmm... not sure the math works out that way. -- Andrei

Yeah the math are wrong, but the general idea remains.

I don't think it make sens to completely discard the idea of barriers, especially when it come to write barrier on the immutable heap. At least that
should certainly pay off.

Part of the equation is D simply does not use GC anywhere near as pervasively as Java does, so the benefit/cost is greatly reduced for D.

You seems to avoid the important part of my message : write barrier tend to be very cheap on immutable data. Because, as a matter of fact, you don't write immutable data (in fact you do to some extent, but the amount of write is minimal.

There is no reason not to leverage this for D, and java comparison are irrelevant on the subject as java does not have the concept of immutability.

The same way, we can use the fact that TL data are not supposed to refers to each others.

Reply via email to