A double* and a vector<double> are theoretically just as good but with Visual C++ you may need to use some compiler flags to turn off unnecessary bounds checking for vector.I didn't mean a vector<double*> I meant using a vector<double> vs. double*
Bottom line appears to be that I should use vector<double> instead of double*
Don't optimise prematurely. Write a program that works first, and then, if you are not satisfied with the performance, check what exactly is taking too long.I am writing a program that includes functions that must be lighting fast. I'm not knowledgeable in optimization techniques, so any up-front time savings help.
That said, don't pessimize prematurely, either. Use general optimization techniques that don't make the code less readable, such as passing large objects by reference, upfront.