Escaping the Tyranny of the GC: std.rcstring, first blood

"Nordlöw" via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 24 13:59:08 PDT 2014


On Wednesday, 24 September 2014 at 20:22:05 UTC, Andrei 
Alexandrescu wrote:
> 1. Code using RC will be more compact about using memory if 
> strings are created and then discarded. Depending on a variety 
> of factors, that may lead to better cache friendliness.
>
> 2. If a GC cycle will occur, that will add to the total run 
> time of GC code, meaning RC code will gain an advantage.
>
> Code that doesn't create/discard a lot of strings and doesn't 
> get to run the GC is likely to be slower with RCString.

Ok, thanks.


More information about the Digitalmars-d mailing list