From: jwinstea@fenris.claremont.edu (Jim Winstead Jr.) Subject: Re: Binary locations Date: Sat, 26 Sep 1992 03:26:39 GMT
In article <3876@copper.Denver.Colorado.EDU> l1ngo@copper.denver.colorado.edu (Linh Ngo) writes:
>
>I prefer the hash table for speed (and a simple 'rehash' when necessary)
>over the way the Bourne shell handles things: it searches the
>directories in your path variable every time you type a command that
>doesn't have a relative or absolute path in front of it.
Actually, I think the way that bash handles it is the most
intelligent - it searches for programs on the PATH the first time you
invoke them, but it keeps a hash table of the ones it has found. This
means no startup delay (running through the PATH and hashing
everything can be time consuming, and is quite unnecessary - most
people use only a small subset of all the commands available), and it
gives you all the speed benefits of the hash table after the first
invokation.
Also, on most normal systems under normal loads you will probably have
the common binary directories (/bin and /usr/bin, mainly) in the
buffer-cache, so the delays in searching the PATH will not necessarily
be that disastrous.
Follow ups are directed to comp.unix.shell, since this is no longer a
Linux issue.
--
+ Jim Winstead Jr. (CSci '95)
| Harvey Mudd College, WIBSTR
| jwinstea@jarthur.Claremont.EDU
+ or jwinstea@fenris.Claremont.EDU