A benchmark, mostly GC

Timon Gehr timon.gehr at gmx.ch
Sun Dec 11 18:39:40 PST 2011


On 12/11/2011 11:46 PM, deadalnix wrote:
> Le 11/12/2011 23:31, Timon Gehr a écrit :
>> On 12/11/2011 11:27 PM, deadalnix wrote:
>>> Le 11/12/2011 22:26, Timon Gehr a écrit :
>>>> On 12/11/2011 10:13 PM, deadalnix wrote:
>>>>> Le 11/12/2011 21:55, Timon Gehr a écrit :
>>>>>> On 12/11/2011 07:02 PM, deadalnix wrote:
>>>>>>> Le 11/12/2011 16:43, Dejan Lekic a écrit :
>>>>>>>>
>>>>>>>> It would be really great to implement a generational GC similar to
>>>>>>>> the
>>>>>>>> C4 mentioned in this presentation:
>>>>>>>> http://www.infoq.com/presentations/Understanding-Java-Garbage-Collection
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> . There is a research-paper about C4 as well:
>>>>>>>> http://dl.acm.org/citation.cfm?id=1993491 .
>>>>>>>
>>>>>>> This GC (like all compacting GC) require that the GC knows what is a
>>>>>>> reference/pointer and what isn't.
>>>>>>>
>>>>>>> This is possible in D using the compile time reflexion to build a
>>>>>>> runtime reflexion. But the standard lib is far away from that. This
>>>>>>> will
>>>>>>> also bloat the executable with reflexion's data, thing that some
>>>>>>> don't
>>>>>>> want.
>>>>>>
>>>>>> The information has to be generated by the compiler, not by the
>>>>>> library.
>>>>>>
>>>>>
>>>>> This is not the way choosen by D. And the way choosen by D is, IMO,
>>>>> supperior.
>>>>>
>>>>> D choosed to have compiler time reflexion, but no runtime reflexion
>>>>> (compiler won't generate it). Given that, and the great capability
>>>>> of D
>>>>> for generic programming, the best solution is to generate
>>>>> information at
>>>>> using compile time reflexion using a lib, to get runtime reflexion.
>>>>>
>>>>> Many application do not want the bloat created by runtime reflexion.
>>>>> This is up to the user to compile with such a lib or not.
>>>>
>>>> We are talking about supporting precise GC, not about custom runtime
>>>> reflection. There is no way to get precise GC right without compiler
>>>> support.
>>>
>>> It is clearly possible by marking not movable what is possibly pointer
>>> in the stack and registers and some runtime reflexion used by the GC.
>>
>> In *precise GC* speak, 'possibly pointer' is a banned term. You
>> understand that? Also compile-time reflection is IMPOSSIBLE if you don't
>> have the source code. It cannot work in a meaningful way.
>>
>> GC support must be built-in. Every attempt to make such a fundamental
>> feature depend on the standard library is comical.
>
> Well, you are the only one here talking about a precise GC. The post you
> reponded to was talking about a compacting GC. Which isn't the same.

The post was talking about C4, which I believed was precise. Anyway, a 
compacting GC which is mostly precise also is very hard to get to work 
using static reflection features. The user would have to explicitly mark 
every module with some mixin.

>
> So please don't go as hominem. I could do the same but it will ends up
> nowhere.

I didn't, but you just did. Let's stop.




More information about the Digitalmars-d mailing list