4 ms·
This is just for the bash case, but I was under the impression that shells cache and hash the binaries they find in the path to avoid doing these lookups. Surpr
by sour-taste 1y ago
This is just for the bash case, but I was under the impression that shells cache and hash the binaries they find in the path to avoid doing these lookups. Surprised by the need for strace showing lookups.
- rascul 1y agoThe caching is per session so starting up a new session will have an empty cache. To verify: strace bash -c 'ls;ls' You should not see the lookups for the second ls invocation.
- yencabulator 1y agoThe hash is probably not very relevant in the age of plentiful RAM & NVMe. Mine is disabled.