Click here to Skip to main content
15,900,725 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Which one more efficient? Pin
Jijo.Raj12-Jan-09 23:19
Jijo.Raj12-Jan-09 23:19 
AnswerRe: Which one more efficient? Pin
«_Superman_»12-Jan-09 22:54
professional«_Superman_»12-Jan-09 22:54 
QuestionHow do you access and change the value of an element in another routine of the program? Pin
dconnell12-Jan-09 17:19
dconnell12-Jan-09 17:19 
AnswerRe: How do you access and change the value of an element in another routine of the program? Pin
Cedric Moonen12-Jan-09 20:45
Cedric Moonen12-Jan-09 20:45 
QuestionUsing XOR to decrypt a previously encrypted program and run (Visual Studio and ASM) Pin
BobMMarley12-Jan-09 16:21
BobMMarley12-Jan-09 16:21 
AnswerRe: Using XOR to decrypt a previously encrypted program and run (Visual Studio and ASM) Pin
Randor 12-Jan-09 23:23
professional Randor 12-Jan-09 23:23 
QuestionSpeeding up lookup table performance Pin
D_code_writer12-Jan-09 13:43
D_code_writer12-Jan-09 13:43 
AnswerRe: Speeding up lookup table performance Pin
Stuart Dootson12-Jan-09 14:37
professionalStuart Dootson12-Jan-09 14:37 
Danny Nowlan wrote:
Because it is a non linear simulation package I need to store a lot of data as Global variables


I'm not sure that necessarily follows...but anyway.

Danny Nowlan wrote:
So I figured I would be clever and I would implement a global lookup table, with regular divisions


Why regular intervals? You want to vary the intervals with the rate of change of the curve, so you're getting a good approximation to the curve with a set of lines.

I've written linear interpolating table lookups for embedded systems - we generally do a binary search over the independent variable to find the points that surround the input, then linearly interpolate between those two. One optimisation that often works is to remember the results of the last lookup (the indices of the two points surrounding the last input) - our systems vary slowly, so the current input often falls in the same range as the last input.

Danny Nowlan wrote:
So it dawned on me that using globals while good for code management is not good for speed


Wouldn't have thought the global-ness (or otherwise) of variables would impact the speed of using/writing them. I avoid global variables 'cause they make it too easy to design systems with high coupling between modules - that's bad.
AnswerRe: Speeding up lookup table performance Pin
Sarath C12-Jan-09 16:47
Sarath C12-Jan-09 16:47 
GeneralRe: Speeding up lookup table performance Pin
Luc Pattyn12-Jan-09 18:24
sitebuilderLuc Pattyn12-Jan-09 18:24 
QuestionExact size font question Pin
nm_11412-Jan-09 11:55
nm_11412-Jan-09 11:55 
AnswerRe: Exact size font question Pin
Stuart Dootson12-Jan-09 14:40
professionalStuart Dootson12-Jan-09 14:40 
AnswerRe: Exact size font question Pin
Randor 12-Jan-09 23:26
professional Randor 12-Jan-09 23:26 
QuestionResource Compiler Error RC2170 bitmap file filename is not in 3.00 format Pin
Larry Mills Sr12-Jan-09 10:52
Larry Mills Sr12-Jan-09 10:52 
AnswerRe: Resource Compiler Error RC2170 bitmap file filename is not in 3.00 format Pin
Rajasekharan Vengalil12-Jan-09 11:34
Rajasekharan Vengalil12-Jan-09 11:34 
AnswerRe: Resource Compiler Error RC2170 bitmap file filename is not in 3.00 format PinPopular
Nathaniel Hannigan1-Mar-10 14:18
Nathaniel Hannigan1-Mar-10 14:18 
GeneralRe: Resource Compiler Error RC2170 bitmap file filename is not in 3.00 format Pin
Miguel Viana20-Apr-11 7:38
Miguel Viana20-Apr-11 7:38 
QuestionVC++ 2008 Undeclared Identifier Pin
Doktor12-Jan-09 10:21
Doktor12-Jan-09 10:21 
QuestionRe: VC++ 2008 Undeclared Identifier Pin
Mark Salsbery12-Jan-09 10:39
Mark Salsbery12-Jan-09 10:39 
AnswerRe: VC++ 2008 Undeclared Identifier Pin
Doktor12-Jan-09 10:45
Doktor12-Jan-09 10:45 
GeneralRe: VC++ 2008 Undeclared Identifier Pin
Mark Salsbery12-Jan-09 10:49
Mark Salsbery12-Jan-09 10:49 
GeneralRe: VC++ 2008 Undeclared Identifier Pin
Doktor12-Jan-09 10:51
Doktor12-Jan-09 10:51 
GeneralRe: VC++ 2008 Undeclared Identifier Pin
Mark Salsbery12-Jan-09 10:56
Mark Salsbery12-Jan-09 10:56 
GeneralRe: VC++ 2008 Undeclared Identifier Pin
Doktor12-Jan-09 11:01
Doktor12-Jan-09 11:01 
GeneralRe: VC++ 2008 Undeclared Identifier Pin
Mark Salsbery12-Jan-09 11:08
Mark Salsbery12-Jan-09 11:08 

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.