Re: C code .vs. Assembly code for Microcontrollers/DSPs ?

fjh@cs.mu.OZ.AU
21 Mar 1996 23:50:54 -0500

          From comp.compilers

Related articles
[33 earlier articles]
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? elvey@hal.com (1996-03-17)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? john.gilliver@gecm.com (1996-03-20)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? leichter@smarts.com (Jerry Leichter) (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? stefan.monnier@lia.di.epfl.ch (Stefan Monnier) (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? cdg@nullstone.com (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? pdonovan@netcom.com (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? fjh@cs.mu.OZ.AU (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? cliffc@ami.sps.mot.com (1996-03-21)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? schwarz@mips.complang.tuwien.ac.at (1996-03-22)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? jfc@mit.edu (1996-03-22)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? chuck@aage.mit.edu (1996-03-22)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? preston@tera.com (1996-03-22)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? bobduff@world.std.com (1996-03-22)
[10 later articles]
| List of all articles for this month |

From: fjh@cs.mu.OZ.AU
Newsgroups: comp.compilers
Date: 21 Mar 1996 23:50:54 -0500
Organization: Compilers Central
References: 96-03-006 96-03-091 96-03-106
Keywords: C, optimize

cdg@nullstone.com (Christopher Glaeser) writes:


>> [Do people really not use const and static? -John]
>
>2) static - Static can cause significant performance problems for many
>C compilers. In particular, few C compilers can keep static variables
>in registers over a region of code.


I think the original poster who suggested using `static' for optimization
purposes was suggesting it as an alternative to making variables
and functions global, not as an alternative to using auto variables.
When used for this purpose, I suspect it may have some effect. For
example, compilers may be more inclined to inline a static function.


--
Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh
fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.