texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Revised patch: Speedup in startup time


From: Norbert Nemec
Subject: Re: [Texmacs-dev] Revised patch: Speedup in startup time
Date: Mon, 15 Jun 2009 07:39:37 +0100
User-agent: Thunderbird 2.0.0.21 (X11/20090409)

Gubinelli Massimiliano wrote:
Ok. For me it wasn't clear if a static variable in an inline function is allocated for each object file or once in each program. A programmer could need both of these behaviors so there should be some way to differentiate them. What is the default, how to switch from one to the other?

Interesting point. I could imagine that a "static" function, which is by definition not visible outside the object file, will have its "static" local variables initialized on a per-object file basis. For non-static inline functions, if the compiler needs to produce code (because maybe it cannot inline some of the calls) there has to be some logic that at most one version of the function is linked into the executable. The static local variables should be handled in the same way.

However, this is indeed a rather tricky detail of the language definition, so I it might be worth checking the compiler. In this case, however, it will not affect the correctness of the program.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]