zlacker

[parent] [thread] 2 comments
1. cridde+(OP)[view] [source] 2022-05-11 14:46:28
Is that ever going to be a hot path?
replies(2): >>hnlmor+Ly >>naniwa+aQ
2. hnlmor+Ly[view] [source] 2022-05-11 17:10:22
>>cridde+(OP)
Theoretically can be. Every command you invoke without a path will need to look up PATH.

In practice well behaving shells cache the contents of PATH to speed up operations.

3. naniwa+aQ[view] [source] 2022-05-11 18:30:56
>>cridde+(OP)
It's probably not exactly going to be hot, but even failing execve is inherently semi-expensive since it needs to be a syscall and incurs context switches.

It's just outweighed a couple orders of magnitude by all the overhead that comes with a successfully launching another executable unless you have, like, a thousand junk paths in your PATH.

[go to top]