Re: [dwm] dmenu-2.4

From: Jukka Salmi <j+dwm_AT_2007.salmi.ch>
Date: Fri, 23 Feb 2007 14:57:06 +0100

Anselm R. Garbe --> dwm (2007-02-23 14:19:12 +0100):
> On Fri, Feb 23, 2007 at 01:11:03PM +0000, Frederik Deweerdt wrote:
> > On Fri, Feb 23, 2007 at 10:50:16AM +0100, Anselm R. Garbe wrote:
> > > I did some benchmarks measuring the difference between
> > > dmenu_path [...]
> > Hi,
> >
> > On my system, this:
> > for i in `echo $PATH | tr : ' '`; do find $i -maxdepth 1 -perm -100 -type f 2> /dev/null ; done | sort -u
> > performs slightly better (~10%) than the ls | awk based approach. I made
> > the measurements without cache (echo 3 > /proc/sys/vm/drop_caches).
>
> I'm not sure if those find arguments are portable enough, can
> someone recheck if it works on BSD and other Unices?

While `-perm' and `-type' are fine, `-maxdepth' is not specified by
POSIX. However, it works fine on NetBSD et al.

Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
Received on Fri Feb 23 2007 - 14:57:06 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:38:09 UTC