[D-runtime] Precise garbage collection

Rainer Schuetze r.sagitario at gmx.de
Sat Jun 29 01:13:25 PDT 2013


On 29.06.2013 06:33, Steven Schveighoffer wrote:
>
> On Jun 28, 2013, at 5:28 PM, Rainer Schuetze <r.sagitario at gmx.de>
> wrote:
>
>> On 28.06.2013 16:16, Steven Schveighoffer wrote:
> The associative array could just as easily make a struct out of that
> pair.  It so happens that when AA's were written, they were a purely
> runtime feature, and did not have the ability to "invent" typeinfo.
> The situation has changed -- AAs are now a template.
>

Unfortunately, both worlds still co-exist, and not always peacefully.

>> The current implementation "emplaces" the pointer bits at the
>> corresponding addresses, but this needs two additional calls into
>> the GC, resulting in far from optimal performance.
>
> You mean the current implementation of the precise GC or the AA?

The precise GC implementation that also patches AA implementation to 
supply type info through emplace.

>
> BTW, I want to stress again that we really should attempt to move the
> compiler away from calling runtime functions, and instead have it
> call template functions.  Such things will make life SOOO much easier
> for experimentation, inlining runtime calls, etc.  For example,
> having the rtInfo has opened several doors already that weren't
> already envisioned on its creation.  Imagine if all runtime calls
> were wrapped in a template, and one could simply update the template
> to experiment with new ideas, instead of hooking the runtime
> function, which is limited to whatever was expected when written.

That's what I am hoping for, too. But until the AA template 
implementation is working successfully I don't expect it to happen for 
other types or calls as well.



More information about the D-runtime mailing list