Fast GC allocation of many small objects

Per Nordlöw per.nordlow at gmail.com
Fri Mar 30 20:31:35 UTC 2018


I'm working on a graph database with tens of millions of small 
nodes containing typically around 8-64 bytes of member data. Is 
there a faster way of allocating many small class objects such as

class Node
{
     // abstract members
}

class StrNode : Node
{
     string value;
}

// more Node-types...

other than

const nodeCount = 10_000_000;
foreach (0 .. n)
{
     auto node = new Node(someData);
     // connect node...
}



More information about the Digitalmars-d-learn mailing list