Jump to page: 1 25  
Page
Thread overview
Would you pay for GC?
Jan 25, 2022
Elronnd
Jan 25, 2022
Random Dude
Jan 25, 2022
Elronnd
Jan 25, 2022
Paulo Pinto
Jan 25, 2022
Elronnd
Jan 25, 2022
rikki cattermole
Jan 25, 2022
Paulo Pinto
Jan 26, 2022
norm
Jan 25, 2022
Araq
Jan 25, 2022
Paulo Pinto
Jan 25, 2022
Araq
Jan 25, 2022
Paulo Pinto
Jan 25, 2022
Paulo Pinto
Jan 25, 2022
rikki cattermole
Jan 25, 2022
Paulo Pinto
Jan 26, 2022
Tejas
Jan 26, 2022
H. S. Teoh
Jan 25, 2022
max haughton
Jan 25, 2022
Mike Parker
Jan 25, 2022
Adam D Ruppe
Jan 27, 2022
Era Scarecrow
Jan 27, 2022
H. S. Teoh
Jan 28, 2022
Elronnd
Jan 28, 2022
rikki cattermole
Jan 25, 2022
bachmeier
Jan 25, 2022
H. S. Teoh
Jan 25, 2022
IGotD-
Jan 26, 2022
rikki cattermole
Jan 26, 2022
Elronnd
Jan 26, 2022
Elronnd
Jan 28, 2022
IGotD-
Jan 28, 2022
Paulo Pinto
Jan 28, 2022
jmh530
Jan 28, 2022
Paulo Pinto
Jan 26, 2022
Guillaume Piolat
January 25, 2022
Apropos recent discussion, here is a serious question: would you pay for either of these?

- High-throughput/scalable gc.  High sustained allocation rates, large heaps, many cores, compacting&generational

- Concurrent gc.  No pauses
January 25, 2022
On Tuesday, 25 January 2022 at 03:37:57 UTC, Elronnd wrote:
> Apropos recent discussion, here is a serious question: would you pay for either of these?
>
> - High-throughput/scalable gc.  High sustained allocation rates, large heaps, many cores, compacting&generational
>
> - Concurrent gc.  No pauses

I'd pay to have it removed and replaced with ARC.

GC in it's current form can not compete with other more performant GCs and it shouldn't. D is in a unique position to enable people to write code as if they're writing python and also accommodate them when they want to do low-level optimizations.

If we could just have automatic reference counting both the GC and No-GC people would be happy. It's okay if that route changes how pointers work (metadata would have to be added and some code would break), this is the right move in the long run.
January 25, 2022
On Tuesday, 25 January 2022 at 06:13:31 UTC, Random Dude wrote:
> GC in it's current form can not compete with other more performant GCs

I think it can, for reasons I've explained elsewhere.  But that's a bit beside the point; the question is: what _would_ you do _if_ it could?

> D is in a unique position to enable people to write code
> as if they're writing python and also accommodate them
> when they want to do low-level optimizations.

Fast AND expressive is a much sexier value proposition than fast XOR expressive.
January 25, 2022
On Tuesday, 25 January 2022 at 06:13:31 UTC, Random Dude wrote:
> On Tuesday, 25 January 2022 at 03:37:57 UTC, Elronnd wrote:
>> Apropos recent discussion, here is a serious question: would you pay for either of these?
>>
>> - High-throughput/scalable gc.  High sustained allocation rates, large heaps, many cores, compacting&generational
>>
>> - Concurrent gc.  No pauses
>
> I'd pay to have it removed and replaced with ARC.
>
> GC in it's current form can not compete with other more performant GCs and it shouldn't. D is in a unique position to enable people to write code as if they're writing python and also accommodate them when they want to do low-level optimizations.
>
> If we could just have automatic reference counting both the GC and No-GC people would be happy. It's okay if that route changes how pointers work (metadata would have to be added and some code would break), this is the right move in the long run.

ARC will also not compete, unless one goes the extra mile of making the compiler ARC aware, elide retain/release calls, do cascade deletions in background threads, take care on cascade deletions to avoid stack overflows on destructor calls, provide multicore friendly versions of them,.....

If you are paying to replace GC with ARC, without putting the money to reach Swift level of performance (which is still pretty lame versus last gen tracing GCs in Java/.NET), then you will be getting lemons.

https://forums.swift.org/t/a-roadmap-for-improving-swift-performance-predictability-arc-improvements-and-ownership-control/54206

I can already see it, the forums being inundated with complains about ARC performance versus other languages.
January 25, 2022
On Tuesday, 25 January 2022 at 07:13:41 UTC, Paulo Pinto wrote:
> ARC will also not compete, unless one goes the extra mile of making the compiler ARC aware, elide retain/release calls, do cascade deletions in background threads, take care on cascade deletions to avoid stack overflows on destructor calls, provide multicore friendly versions of them,.....

Indeed.  See Bacon et al, 'Unified Theory of Garbage Collection': increasingly sophisticated RC approaches tracing (and vice versa).  So it's a bit strange to assume we can do one but not the other.  And tracing makes a better starting point due to the generational hypothesis.
January 25, 2022
On 25/01/2022 8:22 PM, Elronnd wrote:
> On Tuesday, 25 January 2022 at 07:13:41 UTC, Paulo Pinto wrote:
>> ARC will also not compete, unless one goes the extra mile of making the compiler ARC aware, elide retain/release calls, do cascade deletions in background threads, take care on cascade deletions to avoid stack overflows on destructor calls, provide multicore friendly versions of them,.....
> 
> Indeed.  See Bacon et al, 'Unified Theory of Garbage Collection': increasingly sophisticated RC approaches tracing (and vice versa).  So it's a bit strange to assume we can do one but not the other.  And tracing makes a better starting point due to the generational hypothesis.

RC shines for when deterministic destruction is required.

So that is when you have any external resource bound to a D type.

But it is horrible as a language default. Not all types like say a pointer or a slice should be bound to any sort of memory management strategy in a native language.

It is very expensive compared to a GC. Due to the constant cache invalidations going on.

I want to get RC properly in D without having to rely on a struct wrapper. That way the compiler can know that eliding of calls can take place. Plus if its in the language, we can get const string type too with classes and all!
January 25, 2022

On Tuesday, 25 January 2022 at 07:13:41 UTC, Paulo Pinto wrote:

>

If you are paying to replace GC with ARC, without putting the money to reach Swift level of performance (which is still pretty lame versus last gen tracing GCs in Java/.NET), then you will be getting lemons.

With per fiber/task/actor ownership + unique_ptr you reduce the need to increase the refcount significantly.

January 25, 2022
On 25/01/2022 10:23 PM, Ola Fosheim Grøstad wrote:
> On Tuesday, 25 January 2022 at 07:13:41 UTC, Paulo Pinto wrote:
>> If you are paying to replace GC with ARC, without putting the money to reach Swift level of performance (which is still pretty lame versus last gen tracing GCs in Java/.NET), then you will be getting lemons.
> 
> With per fiber/task/actor ownership + unique_ptr you reduce the need to increase the refcount significantly.

With scope without ref or return it may even be possible to elide all calls to reference counting except for the last decrement.
January 25, 2022
On Tuesday, 25 January 2022 at 08:24:22 UTC, rikki cattermole wrote:
>
> On 25/01/2022 8:22 PM, Elronnd wrote:
>> On Tuesday, 25 January 2022 at 07:13:41 UTC, Paulo Pinto wrote:
>>> ARC will also not compete, unless one goes the extra mile of making the compiler ARC aware, elide retain/release calls, do cascade deletions in background threads, take care on cascade deletions to avoid stack overflows on destructor calls, provide multicore friendly versions of them,.....
>> 
>> Indeed.  See Bacon et al, 'Unified Theory of Garbage Collection': increasingly sophisticated RC approaches tracing (and vice versa).  So it's a bit strange to assume we can do one but not the other.  And tracing makes a better starting point due to the generational hypothesis.
>
> RC shines for when deterministic destruction is required.
>
> ...

That is the naive idea, until a cascade deletion of a graph based datastructure happens.
January 25, 2022

On Tuesday, 25 January 2022 at 09:23:01 UTC, Ola Fosheim Grøstad wrote:

>

On Tuesday, 25 January 2022 at 07:13:41 UTC, Paulo Pinto wrote:

>

If you are paying to replace GC with ARC, without putting the money to reach Swift level of performance (which is still pretty lame versus last gen tracing GCs in Java/.NET), then you will be getting lemons.

With per fiber/task/actor ownership + unique_ptr you reduce the need to increase the refcount significantly.

It doesn't matter if it is still worse than the competition.

« First   ‹ Prev
1 2 3 4 5