What's the go with the GC these days?

bioinfornatics bioinfornatics at fedoraproject.org
Tue Jan 8 14:05:03 UTC 2019


On Sunday, 6 January 2019 at 03:42:05 UTC, Walter Bright wrote:
> On 1/5/2019 2:05 PM, Manu wrote:
>> How much truth is in here?
>
> There's a lot of triggering on the word "GC". At some level, it 
> doesn't matter how good or bad the GC is, it's "GC is bad". 
> Even if your code never calls the GC.
>
>
>> What is this business about write barriers making the GC fast? 
>> Is that
>> actually fact, or are there other hurdles?
>
> Here's an explanation:
>
> https://stackoverflow.com/questions/19154607/how-actually-card-table-and-writer-barrier-works
>
> There are many more if you google "gc write barrier".
>
> The penalty, of course, is extra code gets run for every write 
> through a pointer.
>
> The benefits exceed the penalties for a language where all 
> dynamic allocation is done via the GC. But for D, where quite a 
> lot of it is not, it isn't so clear. What is clear is that if 
> you're going to compare speed with C++, having those write 
> barriers in there is going to be a serious penalty, because 
> they'll be there even if you don't use the GC.
>
> > Where's the ARC stuff? What happened to opAddRef/opRelease?
>
> Andrei, Razvan, and I have decided that the most pragmatic way 
> forward to support reference counting is to support copy 
> constructors ala C++. C++ is clearly successful with this 
> approach, and Andrei/Razvan concluded that D's postblit just 
> doesn't cut it. Razvan has a proposal for copy constructors, 
> and an implementation PR that has fallen a bit behind his 
> latest proposal.

Topics: get a better understanding of D's application bottlenecks
It could be interesting to be able to analyze trace execution and 
gc use with tools designed for. As example the process minning (a 
scientific field) seem to be interesting in order to understand 
what happen and where are the bottllenecks.
With such tools people will blame the GC only when he is 
responsible. So a tool which would be able to generate an event 
trace to the file format xes 
(http://www.processmining.org/logs/xes) should be awesome.
Indeed they are somme tools such as Prom 
(http://www.promtools.org/doku.php) which are able to analyse and 
represent it. The developpers will get a better understanding 
with the use with such (animated) representation: 
http://fluxicon.com/blog/wp-content/uploads/2013/11/Disco-Process-Mining-Animation.gif .

Best regards


More information about the Digitalmars-d mailing list