[all-commits] [llvm/llvm-project] beac62: [clang-tidy] Speed up `readability-uppercase-liter...

Victor Chernyakin via All-commits all-commits at lists.llvm.org
Thu Feb 12 09:05:22 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: beac6260c41975d4b7677872a8456737a5b35e6f
      https://github.com/llvm/llvm-project/commit/beac6260c41975d4b7677872a8456737a5b35e6f
  Author: Victor Chernyakin <chernyakin.victor.j at outlook.com>
  Date:   2026-02-12 (Thu, 12 Feb 2026)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp
    M clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.h
    M clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-floating-point.cpp
    M clang-tools-extra/test/clang-tidy/checkers/readability/uppercase-literal-suffix-integer.cpp

  Log Message:
  -----------
  [clang-tidy] Speed up `readability-uppercase-literal-suffix` (#178149)

As usual, this is one of our most expensive checks according to
`--enable-check-profile`.

Measuring overall runtime:

```sh
hyperfine \
    --shell=none \
    --prepare='cmake --build build/release --target clang-tidy' \
    './build/release/bin/clang-tidy --checks=-*,readability-uppercase-literal-suffix all_headers.cpp -header-filter=.* -system-headers -- -std=c++23 -fno-delayed-template-parsing'
```

Status quo:
```txt
Time (mean ± σ):      4.435 s ±  0.012 s    [User: 4.158 s, System: 0.275 s]
Range (min … max):    4.409 s …  4.455 s    10 runs
```
With this change:
```txt
Time (mean ± σ):      3.549 s ±  0.010 s    [User: 3.328 s, System: 0.223 s]
Range (min … max):    3.540 s …  3.569 s    10 runs
```

Measuring with `--enable-check-profile`:

Status quo:
```txt
---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
1.1875 (100.0%)   0.1406 (100.0%)   1.3281 (100.0%)   1.3147 (100.0%)  readability-uppercase-literal-suffix
```
With this change:
```txt
---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
0.2500 (100.0%)   0.0469 (100.0%)   0.2969 (100.0%)   0.2904 (100.0%)  readability-uppercase-literal-suffix
```
However, subtracting 200 ms to account for the "[`hasParent`
tax](https://github.com/llvm/llvm-project/pull/178149#discussion_r2736652174)",
the "true" numbers are probably closer to:
```
                  ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
Status quo:       0.9875 (100.0%)   0.1406 (100.0%)   1.1281 (100.0%)   1.1147 (100.0%)  readability-uppercase-literal-suffix
With this change: 0.0500 (100.0%)   0.0469 (100.0%)   0.0969 (100.0%)   0.0904 (100.0%)  readability-uppercase-literal-suffix



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