String match efficiency in libc environment
Open
libc
libc:potential-optimizations
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The environment matching code in libc currently does a strlen (as part of creating a string_view) of every variable in the environment. This is a waste for long environment variables like PATH which can be hundreds of characters. We could truncate the search at NULL or the right number of characters if we didn't use a string_view (or used a modified container that lazily calculated the string length)
Contributor guide
Assessment
This issue has not been assessed yet.