|
Prev: I was wondering why h file is needed?
Next: std::deque typically faster then std::list for push_back(), front(), pop_front()?
From: Victor V. Terber on 9 Jan 2008 22:08 In existing sources I found a std::list using only methods push_back(), front() and pop_front(). I'm considering to replace the list by std::deque. The usual rule of thumb to use the simplest container that does the job seems to apply here. I'm aware that the standard doesn't say much about performance behavior, but due to various restrictions (client's site, varying compilers, STLs, OS) actual measuring is very hard in this case. Does such a replacement of list by deque seem reasonable? Would you typically expect real-world performance changes? -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |