[all-commits] [llvm/llvm-project] d38b5b: [lit] Add __slots__ to hot shell-execution objects...
Prasoon via All-commits
all-commits at lists.llvm.org
Fri May 29 22:56:41 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d38b5b3b990d8f8e3782ed0ea7e0499dd168d9e6
https://github.com/llvm/llvm-project/commit/d38b5b3b990d8f8e3782ed0ea7e0499dd168d9e6
Author: Prasoon <prasoonkumar054 at gmail.com>
Date: 2026-05-29 (Fri, 29 May 2026)
Changed paths:
M llvm/utils/lit/lit/ShellEnvironment.py
M llvm/utils/lit/lit/builtin_commands/diff.py
Log Message:
-----------
[lit] Add __slots__ to hot shell-execution objects (#199668)
`ShellCommand`, `ShellEnvironment` and `DiffFlags` classes are
instantiated per commad / per diff. `__slots__` drops the per-instance
`__dict__`, lowering memory and speeding attribute access. (`__slots__`
not `@dataclass(slots=True)` to keep Python 3.8 support.)
**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** | 98.708s / 51872 kB |
| **llvm-transforms** | 51.496s / 66824 kB |
This PR is part of the "GSoC 2026: Improving lit" project.
Signed-off-by: Prasoon Kumar <prasoonkumar054 at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list