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: Joris van der Hoeven
Subject: Re: [Texmacs-dev] Revised patch: Speedup in startup time
Date: Sun, 14 Jun 2009 20:39:15 +0200
User-agent: Mutt/1.5.9i

On Sun, Jun 14, 2009 at 06:36:56PM +0200, Gubinelli Massimiliano wrote:
> Hi Norbert,
>  I'm not sure about the behaviour of static variables in inline  
> functions. What about the following code?
> 
> extern url url_none_constant;
> 
> inline url url_none () { if (is_nil(url_none_constant))  
> url_none_constant = as_url (tree("none")); return url_none_constant; }
> inline bool is_none (url u) { return u->t == url_none()->t; }

I think that this is the kind of code generated by the compiler.
A boolean is used for indicating whether the static variable is used for
the first time. This probably remains correct for inline routines,
but it is true that I am not sure.

I will implement something else.

Best wishes, Joris




reply via email to

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