Mail Archives: djgpp-workers/1996/07/25/10:23:38
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 -