Nim's new cycle collector
Araq
rumpf_a at web.de
Thu Apr 30 14:05:27 UTC 2020
On Thursday, 30 April 2020 at 13:49:54 UTC, Bienlein wrote:
> 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.
We don't do atomic reference counting so the results of Swift
don't apply. If you can scroll up to the beginning of
https://forum.nim-lang.org/t/5734 you can read more about it.
More information about the Digitalmars-d
mailing list