This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Make getenv O(1)


On Fri, Oct 18, 2013 at 03:26:04PM +0200, OndÅej BÃlka wrote:
> On Fri, Oct 18, 2013 at 04:58:43PM +0400, Alexander Monakov wrote:
> > Hi,
> > 
> > I'm curious about the motivation of this change.  Which programs are expected
> > to benefit from faster repeated getenv queries?  (note that bash overrides
> > getenv and co, so changes in glibc implementation won't affect it)
> > 
> Mostly those that call getenv in hot path. This mostly issue of
> libraries, for example fnmatch checks getenv ("POSIXLY_CORRECT") so you
> get definite slowdonw in following case.
> 
Also when you run mutt after
for I in `seq 1 10000`; do export FOO$I=$I; done
it becomes noticably sluggy.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]