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

"Nordlöw" via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 20 08:21:16 PDT 2014


On Monday, 15 September 2014 at 02:26:19 UTC, Andrei Alexandrescu 
wrote:
> Andrei

I'm testing your RCstring right now in my code to see how much 
memory it will save and speed it will gain. I want to use 
RCString in place of string as a key in my AAs. Any proposals for 
a suitable implementation of

     size_t toHash() @trusted pure nothrow

for RCString? I'm guessing there are two cases here; one for the 
SSO-case an one for the other. The other should be similar to

     size_t toHash(string) @trusted pure nothrow

right?


More information about the Digitalmars-d mailing list