Hi
I am implementing a data structure that consists of a large network of nodes with pointers between them. I am memory bound, so I like to reduce the memory footprint.
These nodes are all of the same class. Now, the nodes have some data fields that cost memory.
I consider replacing the fields with some methods to compute the data on the fly.
Now the question is: If I have a single class for the nodes, and add some methods, then clearly they take up some memory. But will I pay this memory for every node?
Best
//
Johan
I am implementing a data structure that consists of a large network of nodes with pointers between them. I am memory bound, so I like to reduce the memory footprint.
These nodes are all of the same class. Now, the nodes have some data fields that cost memory.
I consider replacing the fields with some methods to compute the data on the fly.
Now the question is: If I have a single class for the nodes, and add some methods, then clearly they take up some memory. But will I pay this memory for every node?
Best
//
Johan