Nim's new cycle collector

Bienlein ffm2002 at web.de
Thu Apr 30 13:49:54 UTC 2020


On Tuesday, 28 April 2020 at 22:44:48 UTC, Adnan wrote:
> On Tuesday, 28 April 2020 at 22:42:35 UTC, Adnan wrote:
>> https://forum.nim-lang.org/t/5734#38665
>>
>> Text:
>>
>> [...]
>
> Wanted to share this with D friends to see how they view Nim's 
> strategy of reference counting and how it would fit into D in 
> theory.

Objective-C and Swift are two well-known languages that use 
reference counting. I remember some benchmark someone made in his 
thesis where he wrote a drive for something in various languages 
including Go and Objective-C.

The version in Objective-C was too slow for the requirements of a 
driver. It turned out that changing counters when adding and 
removing items to collections were the main reason for this.

On the contrary, the version in Go was fast enough. Apparently 
because Go's GC runs short enough on every collection invocation 
not to slow down the application too much.

So to me the question arises whether reference counting in Nim 
could be a problem for a language that is also intended to be 
used for system programming. Eventually, a mix of reference 
counting and manual memory management would do.


More information about the Digitalmars-d mailing list