Click here to Skip to main content
15,908,842 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Passing a va_list to printf Pin
Jo Fredrickson10-May-03 22:15
Jo Fredrickson10-May-03 22:15 
QuestionPossible solutions to my problem? Pin
georgiek5010-May-03 17:40
georgiek5010-May-03 17:40 
AnswerRe: Possible solutions to my problem? Pin
G. Steudtel12-May-03 1:50
G. Steudtel12-May-03 1:50 
GeneralDialog box Handle where to find it Pin
WinNewbie10-May-03 15:24
sussWinNewbie10-May-03 15:24 
GeneralRe: Dialog box Handle where to find it Pin
Michael Dunn10-May-03 17:12
sitebuilderMichael Dunn10-May-03 17:12 
GeneralRe: Dialog box Handle where to find it Pin
Win Newbie11-May-03 2:39
sussWin Newbie11-May-03 2:39 
GeneralRe: Dialog box Handle where to find it Pin
WinNewbie12-May-03 6:19
sussWinNewbie12-May-03 6:19 
GeneralHave split up string, but there must be a better way of doing this!! Pin
IrishSonic10-May-03 14:18
IrishSonic10-May-03 14:18 
GeneralRe: Have split up string, but there must be a better way of doing this!! Pin
Bartosz Bien10-May-03 14:24
Bartosz Bien10-May-03 14:24 
GeneralRe: Have split up string, but there must be a better way of doing this!! Pin
Michael Dunn10-May-03 14:29
sitebuilderMichael Dunn10-May-03 14:29 
Generalread a vector Pin
aguest10-May-03 13:48
aguest10-May-03 13:48 
GeneralRe: read a vector Pin
Ernest Laurentin10-May-03 14:50
Ernest Laurentin10-May-03 14:50 
GeneralRe: read a vector Pin
aguest10-May-03 15:37
aguest10-May-03 15:37 
GeneralProblem with GetLine() in a CEdit Pin
selecta10-May-03 12:29
selecta10-May-03 12:29 
GeneralRe: Problem with GetLine() in a CEdit Pin
Ernest Laurentin10-May-03 14:44
Ernest Laurentin10-May-03 14:44 
GeneralRe: Problem with GetLine() in a CEdit Pin
selecta11-May-03 6:17
selecta11-May-03 6:17 
GeneralRe: Problem with GetLine() in a CEdit Pin
selecta11-May-03 7:27
selecta11-May-03 7:27 
GeneralHtml control and selection Pin
Atlence10-May-03 11:30
Atlence10-May-03 11:30 
GeneralCBTProc not working Pin
S van Leent10-May-03 8:46
S van Leent10-May-03 8:46 
GeneralRe: CBTProc not working Pin
Ernest Laurentin10-May-03 14:31
Ernest Laurentin10-May-03 14:31 
GeneralRe: CBTProc not working Pin
S van Leent11-May-03 8:24
S van Leent11-May-03 8:24 
GeneralCost of a function call Pin
Shah Shehpori10-May-03 8:13
sussShah Shehpori10-May-03 8:13 
GeneralRe: Cost of a function call Pin
Michael Dunn10-May-03 8:50
sitebuilderMichael Dunn10-May-03 8:50 
GeneralRe: Cost of a function call Pin
Joe Woodbury10-May-03 9:18
professionalJoe Woodbury10-May-03 9:18 
A function call will take up CPU time, however it is very minimal as compared to what you are doing inside the function.

Bringing the function inline could actually make the operation slower under certain circumstances since it could change the optimization.

All this is mostly irrelevant since optimizations shouldn't be based on theory but on measurable results always keeping in mind the adage that 90% of your time is spent in 10% of your code. Also, the algorithm itself is more important than the implementation.

(By chance I was doing some optimizing this morning. So I modified the test a little and found that making an intermediate function call added about 8 CPU cycles per call on a Celeron 900. The result with the new algorithm was still 4x faster than the original algorithm.)

PS. You could use the keyword __forceinline if your test show that this will improve performance.
GeneralRe: Cost of a function call Pin
S van Leent10-May-03 11:17
S van Leent10-May-03 11:17 

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.