Date: Thu, 25 Jul 1996 17:18:24 +0200 (IST) From: Eli Zaretskii To: Morten Welinder Cc: djgpp-workers AT delorie DOT com Subject: Re: _is_executable In-Reply-To: <199607251313.PAA08283@tyr.diku.dk> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 25 Jul 1996, Morten Welinder wrote: > Does anyone have an idea whether it would be worth the while > to make _is_executable() use something smarter like a binary > search for the extension? > > Guess: no, it's disk dominated anyway. Correct. I never saw the string-searching part anywhere near the significant percentages in the profile of `stat'. The disk accesses eat up 80% of the time. That is why by computing the st_nlink field of struct stat for directories, I was able to speed up `find' by a factor of 3-4(!). Which means there is a lot of sense in making that extension list larger (even though it bloats the code). If the code bloat is an issue, the table could be compressed by some simple method. Comments?