delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/07/25/10:23:38

Date: Thu, 25 Jul 1996 17:18:24 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Morten Welinder <terra AT diku DOT dk>
Cc: djgpp-workers AT delorie DOT com
Subject: Re: _is_executable
In-Reply-To: <199607251313.PAA08283@tyr.diku.dk>
Message-Id: <Pine.SUN.3.91.960725171323.17239D-100000@is>
Mime-Version: 1.0

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?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019