Click here to Skip to main content
15,891,708 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
General500% perf improvement in Release build? Pin
Tomasz Sowinski22-May-01 4:39
Tomasz Sowinski22-May-01 4:39 
GeneralRe: 500% perf improvement in Release build? Pin
Derek Price22-May-01 4:57
Derek Price22-May-01 4:57 
GeneralRe: 500% perf improvement in Release build? Pin
Tomasz Sowinski22-May-01 6:26
Tomasz Sowinski22-May-01 6:26 
GeneralRe: STL & List Control Pin
Chris Losinger22-May-01 6:03
professionalChris Losinger22-May-01 6:03 
GeneralRe: STL & List Control Pin
Derek Price22-May-01 6:19
Derek Price22-May-01 6:19 
GeneralRe: STL & List Control Pin
Tomasz Sowinski22-May-01 6:36
Tomasz Sowinski22-May-01 6:36 
GeneralRe: STL & List Control Pin
Chris Losinger22-May-01 6:51
professionalChris Losinger22-May-01 6:51 
GeneralRe: STL & List Control Pin
Derek Price22-May-01 7:49
Derek Price22-May-01 7:49 
Thank you for the code snippet! It was just what I needed! I created two sort functions:

bool sortCol1(const CLabelItem& a, const CLabelItem& b)
{
return (a.m_strText < b.m_strText); // CString
}

bool sortCol2(const CLabelItem& a, const CLabelItem& b)
{
return (a.m_Addr < b.m_Addr); // DWORD
}

and did the sort comparision only on the STL modified code. Here are the results (in ticks) for 50000 rows:

Debug Release
qsort:
CString 55000 22000
DWORD 220 50

STL sort:
CString 1221 420
DWORD 750 220

Summary ( IMHO Smile | :) )
Use STL for code simplicity and maintenance and use STL sort unless the extra 150 ticks for DWORDs are important!

My thanks to all for all the help!


Derek
GeneralRe: STL & List Control Pin
Tomasz Sowinski22-May-01 10:58
Tomasz Sowinski22-May-01 10:58 
GeneralRe: STL & List Control Pin
Derek Price23-May-01 7:05
Derek Price23-May-01 7:05 
GeneralSTL & List Control Pin
Derek Price22-May-01 4:25
Derek Price22-May-01 4:25 
GeneralWorkspace setup Pin
Roger22-May-01 4:07
Roger22-May-01 4:07 
GeneralVSS and C++ automation Pin
22-May-01 2:42
suss22-May-01 2:42 
Generalclicking on a listbox created in runtime over an edit control in a formview Pin
22-May-01 2:23
suss22-May-01 2:23 
GeneralRe: clicking on a listbox created in runtime over an edit control in a formview Pin
l a u r e n22-May-01 23:40
l a u r e n22-May-01 23:40 
GeneralDirectory Selection using File Dialog Pin
22-May-01 2:13
suss22-May-01 2:13 
GeneralRe: Directory Selection using File Dialog Pin
Tomasz Sowinski22-May-01 2:18
Tomasz Sowinski22-May-01 2:18 
GeneralAdding a new popup menu Pin
Bartek22-May-01 1:06
Bartek22-May-01 1:06 
GeneralRe: Adding a new popup menu Pin
Christian Graus22-May-01 1:47
protectorChristian Graus22-May-01 1:47 
GeneralRe: Adding a new popup menu Pin
Bartek22-May-01 2:22
Bartek22-May-01 2:22 
Generalactivex Pin
eXplodus21-May-01 23:56
eXplodus21-May-01 23:56 
GeneralEnterbutton Pin
21-May-01 23:31
suss21-May-01 23:31 
GeneralRe: Enterbutton Pin
22-May-01 5:41
suss22-May-01 5:41 
GeneralRe: Enterbutton Pin
22-May-01 20:51
suss22-May-01 20:51 
GeneralADO Parameters Pin
Richard Hudson21-May-01 22:46
Richard Hudson21-May-01 22:46 

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.