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

Robert burner Schadek via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 15 02:53:25 PDT 2014


On Monday, 15 September 2014 at 02:26:19 UTC, Andrei Alexandrescu 
wrote:
>
> The road there is long, but it starts with the proverbial first 
> step. As it were, I have a rough draft of a almost-drop-in 
> replacement of string (aka immutable(char)[]). Destroy with 
> maximum prejudice:
>
> http://dpaste.dzfl.pl/817283c163f5
>

I haven't found a single lock, is single threading by design or 
is thread-safety on your todo?

Could you transfer this into phobos and make it work with the 
functions in std.string, it would be a shame if they wouldn't 
work out of the box when this gets merged. I haven't seen 
anything that should prevent using the functions of std.string 
except isSomeString but that should be no problem to fix. This is 
sort of personal to me as most of my PR are in std.string and I 
sort of aspire to become the LT for std.string ;-)

I would assume RCString should be faster than string, so could 
you provide a benchmark of the two.


More information about the Digitalmars-d mailing list