Subject: Re: locate(1) (was Re: CVS commit: basesrc)
To: enami tsugutomo <enami@sm.sony.co.jp>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-userlevel
Date: 03/08/2000 08:57:40
enami tsugutomo <enami@sm.sony.co.jp> writes:
> I guess the question is how much of memory comsumed by making find to
> sort, and guess that not so much as temprary storage used by sort,
> since the comparison is done in each directory component.

Uh, but before outputting anything from 'find,' you'd still have to
have all records in memory before you could output any of them.

I'd expect that unless you're using some algorithm in 'find' that
doesn't _actually_ sort the data, the big-O order of storage for each
would be the same (perhaps differing, of course, in the constant
factor).  In fact, i'd expect the constant factor to be smaller for
sort than for find, because it's easiest for find to represent a given
pathname's data with other information attached, whereas in sort, it
should just be line length (and maybe space for specially selected
sort keys).



cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.