4 ms·
Unity games are often reported to have performance issues, allegedly due to the underlying GC (or lack of understanding of it). Is there a way of running C# wi
by stcredzero 10y ago
Unity games are often reported to have performance issues, allegedly due to the underlying GC (or lack of understanding of it).
Is there a way of running C# with reference counting?
- flukus 10y agoAt that point you've created a different language with different semantics.
- stcredzero 10y agoI think "you can write C#, but you can only have your references form a DAG" would be acceptable in a lot of contexts, like game programming. (Existing libraries would still require some form of tracing, but I think there are ways that the tracing could be handled by another thread.)
- theprotocol 10y agoI instinctively get that thought whenever I work with C#. It's really nice but would it kill them to at least offer simplistic memory management semantics?
- pjmlp 10y agoPeople think RC as GC algorithm is simpler, but it isn't. Naive implementations are slower than tracing GC, while high performance ones are as complex as tracing GC ones, while having the burden of forcing the developers to explicitly deal with cycles.
- stcredzero 10y agohigh performance ones are as complex as tracing GC ones, while having the burden of forcing the developers to explicitly deal with cycles. I bet there are plenty of game developers who would be only too glad to arrange their references as a DAG, if they could have guaranteed low latency.
- pjmlp 10y agoMaybe, but if they don't take care, some stack overflow surprises might happen, the fun of cascade deletions.