Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make Nuke an `optimization' that made source list cr...



details:   https://anonhg.NetBSD.org/src/rev/dd1de7f3f8c7
branches:  trunk
changeset: 487638:dd1de7f3f8c7
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Sat Jun 10 13:48:48 2000 +0000

description:
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.

diffstat:

 usr.bin/make/parse.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r 6a8115b5d0ad -r dd1de7f3f8c7 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sat Jun 10 12:56:45 2000 +0000
+++ b/usr.bin/make/parse.c      Sat Jun 10 13:48:48 2000 +0000
@@ -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 <sys/cdefs.h>
 #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 @@
     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);



Home | Main Index | Thread Index | Old Index