> Missing type checks should be easily added to every incovation lacking
> them, they're clearer to read and might even speed things up by
> preventing direcctory names to be matched against "*.orig" for example.
> 
> When both primaries are present, `-type' should occur first for similar
> reasons: if you're looking for files with specific names, you don't want
> to string compare names first only to discard the file later on because
> it is a directory or symbolic link;  some invocations do `-name' before
> `-type' and I'd argue that swapping their order is both safe to do and
> actually a bit faster (for big file trees (with slow I/O)).

I've always thought *not* using -type and matching purely on -name
is faster because the name is in the directory entry while the type
is stored in an inode which needs to be be fetched separately...
of course the performance of string comparison depends on the actual
name you're looking for and the file hierachy.

Reply via email to