Click here to Skip to main content
15,915,324 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem in release mode Pin
nnvidya30-Jun-04 19:18
nnvidya30-Jun-04 19:18 
GeneralRe: Problem in release mode Pin
David Crow1-Jul-04 2:12
David Crow1-Jul-04 2:12 
GeneralRe: Problem in release mode Pin
nnvidya1-Jul-04 19:06
nnvidya1-Jul-04 19:06 
GeneralRe: Problem in release mode Pin
David Crow2-Jul-04 2:52
David Crow2-Jul-04 2:52 
GeneralRe: Problem in release mode Pin
Johan Rosengren25-Jun-04 2:52
Johan Rosengren25-Jun-04 2:52 
GeneralC++ lookup table implementation Pin
Indrawati24-Jun-04 20:13
Indrawati24-Jun-04 20:13 
GeneralRe: C++ lookup table implementation Pin
wb24-Jun-04 23:22
wb24-Jun-04 23:22 
GeneralRe: C++ lookup table implementation Pin
Henry miller25-Jun-04 3:36
Henry miller25-Jun-04 3:36 
Lookup tables can be faster, depends on your needs, and your CPU. The CPU will calculate out to as many decimals as it can, if the first thing you do after getting an answer is round to the nearest intiger, then the lookup table is likely to be faster. However there are issues of cache that make it really hard to say. The larger the table the less advantage it has. (most operations you lookup are tight loops that can run entirelly in cache on a modern CPU with FEW stalls, while searching the table means a pipeline stall while loading the correct value from memory.

Go back a few generations and try to run on a 8088 CPU and the lookup table will scream. No FPU, and even if there was, memory access compared to CPU cycles is a lot cheaper However memory available is much less so you might not have room for the table.

In fact the faster answer might depend on if you are using a celeron, PPC, P4, or athalon just to name a full current CPUs. How portable do you need to be?

One question: I assume you are not doing premature optimization. That is your have your app running, it is too slow on the targeted CPU, and your profiler has determined that these operations are taking a lot of time. Remember, if the operation you are optimizing takes 0.1% of the CPU time no optimization can make a significant difference no matter how good. If it takes 50% of your CPU time you can make a big difference.
GeneralMS office List view activex ctrl Pin
LasVegasGuy24-Jun-04 19:31
LasVegasGuy24-Jun-04 19:31 
Questionmore than one Toolbar in MFC document??? Pin
Balkoth24-Jun-04 17:04
Balkoth24-Jun-04 17:04 
AnswerRe: more than one Toolbar in MFC document??? Pin
Anthony_Yio24-Jun-04 20:36
Anthony_Yio24-Jun-04 20:36 
Questionhow can i get the modificationof the dialog? Pin
Lido Paul24-Jun-04 16:56
Lido Paul24-Jun-04 16:56 
AnswerRe: how can i get the modificationof the dialog? Pin
PJ Arends24-Jun-04 18:03
professionalPJ Arends24-Jun-04 18:03 
Questionhow do i acces an edit box's member functions? Pin
cadejohx24-Jun-04 16:49
cadejohx24-Jun-04 16:49 
AnswerRe: how do i acces an edit box's member functions? Pin
Ryan Binns24-Jun-04 18:07
Ryan Binns24-Jun-04 18:07 
GeneralRe: how do i acces an edit box's member functions? Pin
cadejohx24-Jun-04 19:05
cadejohx24-Jun-04 19:05 
GeneralRe: how do i acces an edit box's member functions? Pin
PJ Arends24-Jun-04 20:09
professionalPJ Arends24-Jun-04 20:09 
AnswerRe: how do i acces an edit box's member functions? Pin
David Crow25-Jun-04 4:04
David Crow25-Jun-04 4:04 
Generalabout font in a dialog Pin
yingkou24-Jun-04 15:56
yingkou24-Jun-04 15:56 
GeneralRe: about font in a dialog Pin
Anthony_Yio24-Jun-04 20:15
Anthony_Yio24-Jun-04 20:15 
Questionhow to realize after my login dialog end and follow a image coming out for a while? Pin
vividtang24-Jun-04 12:31
vividtang24-Jun-04 12:31 
AnswerRe: how to realize after my login dialog end and follow a image coming out for a while? Pin
Anthony_Yio24-Jun-04 20:22
Anthony_Yio24-Jun-04 20:22 
Questionif i do not write special class to realize hyperlink,is there a more simpler way to solve it? Pin
vividtang24-Jun-04 12:27
vividtang24-Jun-04 12:27 
AnswerRe: if i do not write special class to realize hyperlink,is there a more simpler way to solve it? Pin
Michael Dunn24-Jun-04 12:36
sitebuilderMichael Dunn24-Jun-04 12:36 
Questionin a function can i use ExecuteSQL using the same database connection more than two times not using CRecordset object? Pin
vividtang24-Jun-04 12:23
vividtang24-Jun-04 12:23 

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.