Re: [Dev-C++] Use of const qualifier
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2002-11-02 10:27:36
|
1 - Declaring a function inline doesn't work for function pointers, or when writing mixed-language programss. 2 - Eliminating the function to remove the function call obviously doesn't work either for same reason as above. 3 - The link referenced below is written with DSP processors in mind. Some optimization work. A lot of the suggestions are questionable on a general-purpose processor. /Per W On Sat, 2 Nov 2002, Abhijit Shylanath wrote: > > > > > Yes. Also if you can make it easy to be inlined things will be more > > > better. > > > > Inlining a function is decided by the compiler. Functions with loops, etc. > > are generally not inlined, so this won't be of much help. You can achieve > > the same end by simply eliminating the function (moving all of the code > into > > the main routine). This will remove the overhead of function calls and > > memory allocation (which should help a lot in this case). This should be a > > case of code-elegance versus execution-speed. Also consider generating > > look-up tables of sine and cos. There are a lot of articles on the web > about > > optimizing programs. I remember one that spoke in explicit detail about > how > > memory can be optimized... unfortunately, I don't remember saving it. > Google > > helps. > > This site: > > http://www.numerix-dsp.com/c_coding.html > > says that static variables help. > > ___________________________________________________________ > > Abhijit Shylanath > > E-mail: mu...@gm... || ibr...@bi... > Web-site: http://mudeth.tripod.com/ > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |