[m-dev.] putting all those little files in subdirectories

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Mar 18 18:53:52 AEDT 1998


On 17-Mar-1998, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> Actually, even adding an extra pathname component (Mercury/) on a thousand
> files will slow down make significantly.

Perhaps. 

> We can accept this slowdown if
> it yields a bigger speedup by reducing the impact of n^2 directory search
> algorithms in the kernel, but I wouldn't want to pay it just to get
> a very slightly cleaner directory name space.

Well, using Mercury/ints/, Mercury/cs/, etc. won't buy you much in
performance over using just ints/, cs/, etc.
In fact it will probably reduce performance.  But I don't think it will
reduce it much, and I prefer the cleaner namespace.

The change I am about to commit always uses `Mercury/'.
If you want to test how much it slows things down, there's only two places
that need to be changed: the definition of SUBDIR=Mercury/ in
scripts/Mmake.rules, and the code which inserts "Mercury/"
in choose_file_name in compiler/modules.m.

(To quote the "News need not be slow" paper by Henry Spencer et al
which you pointed me at: "_Performance is not everying_" ;-)

> Another consideration that the name space redesign should address is
> the ability for object files for more than one architecture to coexist.
> This is especially important if cyclone is down, or if a bug shows up
> only on an architecture which is not your main development platform
> (e.g. SPARC register windows). Both situations have come up recently.
> I don't think you need more directories for this; including the platform
> name in the object file name (and if necessary, the C file name)
> would be enough.
> Along the same lines, being able to have both traced and non-traced C and
> object files around at the same time will soon be desirable.

I agree these are good ideas, but I'm not going to do them as part of
this change.  If someone wants to work on this, please go ahead.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list