This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[RFC] Make getenv O(1)
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: libc-alpha at sourceware dot org
- Date: Mon, 14 Oct 2013 17:52:29 +0200
- Subject: [RFC] Make getenv O(1)
- Authentication-results: sourceware.org; auth=none
Hi, when I browsed getenv i found that it uses linear search.
But in getenv there is code that uses trees and I have doubts about its
usefullness.
The getenv/setenv could be easily changed to use hash table, does
something block us to do so?
A possible complication would be that we need additionaly maintain
__environ which causes some code overhead.
Comments?