[Xastir-Dev] does it make sense to start killing globals?

Derrick J Brashear shadow at dementia.org
Wed Jul 2 12:43:34 EDT 2003


On Wed, 2 Jul 2003, Alan Crosswell wrote:

> I respectfully disagree.  I'm a old timer who still remembers that there's
> hardware under them there lines of code.  Invoking a C function to get the value
> of such a simple thing as scale_x seems like a lot of overkill.  In a real OOL,
> of course these simple things are optimized out by the compiler, but not by cc.

Well, this is the issue I had in mind when I asked. It's extra
instructions, yes. The alternative is to make the code clean without
actually changing by doing something like inlining the accessor functions
and not actually making the variables static except when doing test
builds, which means that if the need arises to not be global, you
de-inline accessors, make the variables static, and you're done.

Of course:
-I don't know if all the relevant compilers can deal with inline functions
in headers
-More importantly, is it worth the effort at all?

And now I should figure out why xastir-dev mail is being misfiled.






More information about the Xastir-dev mailing list