September 19th, 2003, 02:20 PM
which is faster (C++)
my question is this. Which is faster on execution, and why?
1)storing data in a vector of strings
2) opening a file and storing the data in the file.
note: there is about 800 pages of data.
note: I will also be accessing the data several times in the program
This message is a natural product made from recycled electrons. The slight
variations in spelling and grammar enhance its individual character and
beauty and in no way are to be considered flaws or defects.
September 19th, 2003, 06:02 PM
Without question, storing data in the vector will be faster. This is because memory access is always faster than disk access. The only time this will not be true is if your system is overloaded and it is swapping memory to disk. That situation implies though that your system is overloaded anyway, and you need more hardware. Hopefully that is not the case.
Articles and commentary on web development