From 83f22c12ea60703eef4760e72930d0c84821094f Mon Sep 17 00:00:00 2001 From: mycroft Date: Sat, 10 Jun 2000 13:48:48 +0000 Subject: [PATCH] Nuke an `optimization' that made source list creation O(n^2). This may cause more memory to be used with stupid Makefiles, but it saves a fair amount of time (~13% just for libc) with sane ones. --- usr.bin/make/parse.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 432413f09a4d..9ebe2204a6a9 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.48 2000/05/11 08:22:40 sjg Exp $ */ +/* $NetBSD: parse.c,v 1.49 2000/06/10 13:48:48 mycroft Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -39,14 +39,14 @@ */ #ifdef MAKE_BOOTSTRAP -static char rcsid[] = "$NetBSD: parse.c,v 1.48 2000/05/11 08:22:40 sjg Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.49 2000/06/10 13:48:48 mycroft Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.48 2000/05/11 08:22:40 sjg Exp $"); +__RCSID("$NetBSD: parse.c,v 1.49 2000/06/10 13:48:48 mycroft Exp $"); #endif #endif /* not lint */ #endif @@ -445,7 +445,11 @@ ParseLinkSrc (pgnp, cgnp) GNode *cgn = (GNode *) cgnp; if ((pgn->type & OP_DOUBLEDEP) && !Lst_IsEmpty (pgn->cohorts)) pgn = (GNode *) Lst_Datum (Lst_Last (pgn->cohorts)); +#if 0 if (Lst_Member (pgn->children, (ClientData)cgn) == NILLNODE) { +#else + if (1) { +#endif (void)Lst_AtEnd (pgn->children, (ClientData)cgn); if (specType == Not) { (void)Lst_AtEnd (cgn->parents, (ClientData)pgn);