|
-
March 8th, 2011, 01:48 AM
#3
Re: vector vs. deque
 Originally Posted by dellthinker
According to the documentation on cplusplus.com
I find this quote highly misleading.
In fact exponential growth (typically used by vector implementations) has proved more efficient than linear growth (typically used by deque implementations) in most scenarios.
So adding items to the end of a vector is likely to be much faster than adding the same number to the end of a deque, especially if the number is large.
And you're no more likely to run out of memory with vector than with deque. Not with typical usage. The question will be how much memory you have and how many items you store, not whether you store them in a vector or a deque.
Last edited by nuzzle; March 8th, 2011 at 02:48 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|