Click here to Skip to main content
15,885,645 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: create a window for callbacks Pin
Richard MacCutchan11-Nov-13 22:37
mveRichard MacCutchan11-Nov-13 22:37 
GeneralRe: create a window for callbacks Pin
bkelly1312-Nov-13 15:50
bkelly1312-Nov-13 15:50 
AnswerRe: What is the window argument in WSAAsyncSelect(...) Pin
Orjan Westin19-Nov-13 23:25
professionalOrjan Westin19-Nov-13 23:25 
GeneralRe: What is the window argument in WSAAsyncSelect(...) Pin
bkelly1321-Nov-13 14:51
bkelly1321-Nov-13 14:51 
QuestionMFC vs STL performance test Pin
Alexander Fedorov18-Oct-13 11:42
Alexander Fedorov18-Oct-13 11:42 
AnswerRe: MFC vs STL performance test Pin
Richard MacCutchan18-Oct-13 21:08
mveRichard MacCutchan18-Oct-13 21:08 
GeneralRe: MFC vs STL performance test Pin
Alexander Fedorov19-Oct-13 0:46
Alexander Fedorov19-Oct-13 0:46 
GeneralRe: MFC vs STL performance test Pin
pasztorpisti19-Oct-13 4:44
pasztorpisti19-Oct-13 4:44 
To me this simply doesn't seem to be a question and posting code bloat is not really valid on CP I think.

MFC containers: Read this: http://stackoverflow.com/questions/1348078/why-stl-containers-are-preferred-over-mfc-containers[^]

MFC containers vs stl containers: stl is highly portable. The MFC/ATL CString is often better. And we could list pros and contras but I would suggest using stl because it is portable across platforms/compilers...

None of these containers are perfect. They are still OK for 99% of average user applications because performance really doesn't matter in most applications. The threads of an average program spend most of their time sleeping and waiting for IO so the heavy weightlifting is done by the OS and not by the containers compiled into a program.

In far less then 1% of the cases when performance or memory usage matters often none of the above solutions are OK and in that case you have to write your own container specialized for an edge case. For example what do you do if you want a vector that doesn't allocate capacity for 16 items by default even if its empty? Or if you want a vector that takes only the space of a null pointer when empty (because you want to have a lot of vectors and most of them will be empty)?

I wouldn't waste my time comparing the efficiency of two general-purpose container libraries for the reasons mentioned above, especially because you use general-purpose containers usually when performance/memory usage isn't a terrible issue. If you have issues then you circumvent them either by changing your algorithm/memory access to help the general-purpose container library to perform better or by providing custom allocators or as a last resort by writing your own.
GeneralRe: MFC vs STL performance test Pin
Alexander Fedorov19-Oct-13 5:15
Alexander Fedorov19-Oct-13 5:15 
GeneralRe: MFC vs STL performance test Pin
pasztorpisti19-Oct-13 5:31
pasztorpisti19-Oct-13 5:31 
GeneralRe: MFC vs STL performance test Pin
Richard MacCutchan19-Oct-13 6:21
mveRichard MacCutchan19-Oct-13 6:21 
AnswerRe: MFC vs STL performance test Pin
Aescleal21-Oct-13 23:58
Aescleal21-Oct-13 23:58 
GeneralRe: MFC vs STL performance test Pin
Alexander Fedorov22-Oct-13 2:05
Alexander Fedorov22-Oct-13 2:05 
GeneralRe: MFC vs STL performance test Pin
Aescleal22-Oct-13 4:44
Aescleal22-Oct-13 4:44 
GeneralRe: MFC vs STL performance test Pin
Alexander Fedorov22-Oct-13 5:32
Alexander Fedorov22-Oct-13 5:32 
Answerstd::map too slow Pin
bkelly1310-Nov-13 16:08
bkelly1310-Nov-13 16:08 
GeneralRe: std::map too slow Pin
Albert Holguin14-Nov-13 10:02
professionalAlbert Holguin14-Nov-13 10:02 
GeneralRe: std::map too slow Pin
Aescleal15-Nov-13 11:07
Aescleal15-Nov-13 11:07 
GeneralRe: std::map too slow Pin
Albert Holguin15-Nov-13 11:32
professionalAlbert Holguin15-Nov-13 11:32 
QuestionWhy calling sort() crashes? Pin
Kumar Anitesh15-Oct-13 22:38
Kumar Anitesh15-Oct-13 22:38 
AnswerRe: Why calling sort() crashes? Pin
Richard MacCutchan15-Oct-13 23:06
mveRichard MacCutchan15-Oct-13 23:06 
AnswerRe: Why calling sort() crashes? Pin
Theo Buys9-Sep-14 2:46
Theo Buys9-Sep-14 2:46 
Questionstd::string name.copy(...) Pin
bkelly132-Oct-13 12:02
bkelly132-Oct-13 12:02 
AnswerRe: std::string name.copy(...) Pin
Richard MacCutchan2-Oct-13 21:24
mveRichard MacCutchan2-Oct-13 21:24 
GeneralRe: std::string name.copy(...) Pin
bkelly134-Oct-13 7:19
bkelly134-Oct-13 7:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.