This is the mail archive of the
mailing list for the glibc project.
Re: [RFC] Make getenv O(1)
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Alexander Monakov <amonakov at ispras dot ru>
- Cc: Florian Weimer <fweimer at redhat dot com>, Rich Felker <dalias at aerifal dot cx>, libc-alpha at sourceware dot org
- Date: Fri, 18 Oct 2013 15:47:33 +0200
- Subject: Re: [RFC] Make getenv O(1)
- Authentication-results: sourceware.org; auth=none
- References: <20131014155229 dot GA25159 at domone dot podge> <20131014165411 dot GZ20515 at brightrain dot aerifal dot cx> <20131014172852 dot GA26005 at domone dot podge> <52611F60 dot 3080700 at redhat dot com> <20131018124013 dot GA15803 at domone dot podge> <alpine dot LNX dot 2 dot 00 dot 1310181656380 dot 3212 at monopod dot intra dot ispras dot ru> <20131018132604 dot GA16445 at domone dot podge>
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.