Make mkdeps.com go faster

This program usually runs once at the begininng of each GNU Make
invocation. It generates an o//depend file with 170,000 lines of
Makefile code to define source -> headers relationships.

This change makes that take 650 milliseconds rather than 1,100ms
by improving the performance of strstr(), using longsort(), plus
migrating to the new append library.
This commit is contained in:
Justine Tunney 2021-10-04 06:24:56 -07:00
parent 725f4d79f6
commit 28997f3acb
5 changed files with 120 additions and 94 deletions

View file

@ -546,6 +546,7 @@ if 1:
self.assertIn(b"Non-UTF-8", res.err)
@support.cpython_only
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
def test_compiler_recursion_limit(self):
# Expected limit is sys.getrecursionlimit() * the scaling factor
# in symtable.c (currently 3)