This speeds up the LLD test suite on Windows by 3x. Most of the time is
spent on lld/test/ELF/linkerscript/diagnostics.s, which repeatedly
constructs linker scripts with appending echo commands.
Details
Diff Detail
- Build Status
Buildable 8027 Build 8027: arc lint + arc unit
Event Timeline
Looks pretty good... just a few nits and one suggestion.
llvm/utils/lit/lit/TestRunner.py | ||
---|---|---|
7 | Minor nit: you should usually have access to cStringIO, which might be faster. The common pattern to use it goes like this: try: import cStringIO as StringIO except ImportError: import StringIO | |
245 | Would it make sense to use while instead of if? (That would handle the case of 'echo -e -n blah'). | |
262 | (Syntax nit) It looks like args will always be a list, even if it's 0-length, right? You can omit the if-check in that case (for-loop over an empty list is effectively a no-op). | |
421 | (Minor nit) For consistency, you might want to drop the outer parens. (Or leave them, I just wanted to double-check.) |
llvm/utils/lit/lit/TestRunner.py | ||
---|---|---|
7 | Done. It's kind of a micro-optimization, so I wasn't sure if it was worth it. | |
262 | I need to check this for stdout.write(maybeUnescape(args[-1])), though. It seemed simpler to put the for loop inside the conditional as well. | |
421 | Oops, this was a two-line conditional that got shortened. |
Minor nit: you should usually have access to cStringIO, which might be faster. The common pattern to use it goes like this: