llvm-project
082ac6e3 - [lit] Optimize ShLexer string construction (#199641)

Commit
2 days ago
[lit] Optimize ShLexer string construction (#199641) `lex_arg_quoted` and `lex_arg_slow` methods in the `lit`'s `ShLexer` class used `+=` for string concatenation, which was inefficient. This change replaces that pattern by collecting string fragments in a list and using `"".join()` at the end. **Baseline:** | Stage | Metric (Runtime / Peak RSS) | | :--- | :--- | | **CodeGen-X86** | 99.310s / 51872 kB | | **llvm-transforms** | 51.457s / 66928 kB | **Changes made here:** | Stage | Metric (Runtime / Peak RSS) | | :--- | :--- | | **CodeGen-X86** | 94.964s / 51868 kB | | **llvm-transforms** | 50.890s / 66328 kB | This PR is part of the "GSoC 2026: Improving lit" project. Signed-off-by: Prasoon Kumar <prasoonkumar054@gmail.com>
Author
Parents
Loading