I'm implementing something in C++ (arbatrary large numbers for those who remember my last post), where speed and efficientcy is really important. I've been thinking about several implementation ideas, and the bulk of the decision comes down to either using an array, a linked list, or a vector. But no matter which one I use, it seems that some problems arise.
I need to be able to resize the data structure I'm using incase said number gets to pick for the current amount of space, while being able to perform operations (such as multiplication, division, addition, GCD, etc...) efficiently. If I use arrays, I can't resize them using new/delete, and I don't want to have to use malloc/re-alloc/free mixed with the rest of my C++ code. If I use linked lists of a vector, I'm worried that this may not be too efficient because of the scattered pieces in memory, increased number of page faults, and what not...
I've looked at a variety of algorithms for arbatrary larger numbers and I understand them relatively well, so that's not an issue, but rather just the way I would be storing that data. I was just wondering what everyone's input/suggestion on this was, considering that efficientcy plays a big role on this
Thanks for your time,
This post has been edited by Nizbel99: 30 June 2010 - 12:18 PM