Issue 128087
Summary Poor performance of performance-unnecessary-value-param in clang-tidy 19.1.7
Labels clang-tidy
Assignees
Reporter roblub
    After upgrading clang-tidy from version 18.1.6 to 19.1.7 I noticed that `performance-unnecessary-value-param` got really slow.

I run with `clang-tidy --enable-check-profile`  on our code base, once with the old version, and once with the new one. Then I grepped entries of this check, sorted them by the first field, and please see top 20 entries from each version:
- clang-tidy 19.1.7:
```
  1296.1571 ( 92.3%)   1.6836 (  3.6%) 1297.8407 ( 89.4%)  1301.2990 ( 89.3%)  performance-unnecessary-value-param
 943.5278 ( 86.0%)   4.0867 (  6.5%)  947.6145 ( 81.6%)  959.5694 ( 81.5%) performance-unnecessary-value-param
  866.4393 ( 91.0%)   0.6227 (  1.6%) 867.0620 ( 87.6%)  867.1579 ( 87.6%)  performance-unnecessary-value-param
 650.7637 ( 81.9%)   3.9667 (  6.8%)  654.7304 ( 76.7%)  660.7008 ( 76.7%) performance-unnecessary-value-param
  632.6522 ( 83.4%)   1.3317 (  2.7%) 633.9839 ( 78.4%)  637.5449 ( 78.5%)  performance-unnecessary-value-param
 592.1411 ( 82.4%)   1.1224 (  2.3%)  593.2635 ( 77.4%)  595.2981 ( 77.4%) performance-unnecessary-value-param
  574.6037 ( 80.0%)   7.1497 ( 11.5%) 581.7534 ( 74.5%)  594.6721 ( 74.7%)  performance-unnecessary-value-param
 555.9572 ( 85.2%)   0.5483 (  1.4%)  556.5055 ( 80.3%)  556.5736 ( 80.3%) performance-unnecessary-value-param
  549.7090 ( 81.4%)   0.8889 (  1.7%) 550.5980 ( 75.8%)  551.1463 ( 75.7%)  performance-unnecessary-value-param
 543.0547 ( 79.6%)   2.9457 (  5.3%)  546.0004 ( 74.0%)  550.6407 ( 73.9%) performance-unnecessary-value-param
  535.2278 ( 80.0%)   1.2093 (  2.4%) 536.4371 ( 74.5%)  539.3148 ( 74.4%)  performance-unnecessary-value-param
 526.2376 ( 79.6%)   1.1839 (  2.3%)  527.4214 ( 74.0%)  531.4533 ( 73.9%) performance-unnecessary-value-param
  501.3134 ( 77.1%)   2.2074 (  3.7%) 503.5208 ( 70.9%)  513.0346 ( 70.9%)  performance-unnecessary-value-param
 500.1112 ( 79.7%)   2.3116 (  4.6%)  502.4228 ( 74.2%)  510.7616 ( 74.2%) performance-unnecessary-value-param
  497.1975 ( 87.5%)   0.6075 (  2.1%) 497.8050 ( 83.4%)  498.6758 ( 83.3%)  performance-unnecessary-value-param
 488.6909 ( 81.5%)   0.8534 (  1.9%)  489.5443 ( 76.0%)  491.9533 ( 76.0%) performance-unnecessary-value-param
  473.3286 ( 80.9%)   2.4528 (  5.3%) 475.7814 ( 75.3%)  478.7844 ( 75.3%)  performance-unnecessary-value-param
 471.0853 ( 81.0%)   0.7795 (  1.7%)  471.8648 ( 75.4%)  473.7543 ( 75.3%) performance-unnecessary-value-param
  467.9987 ( 77.3%)   2.6716 (  4.9%) 470.6703 ( 71.3%)  480.3696 ( 71.4%)  performance-unnecessary-value-param
 467.5921 ( 79.2%)   1.1558 (  2.4%)  468.7479 ( 73.3%)  470.5755 ( 73.2%) performance-unnecessary-value-param
```
- clang-tidy 18.1.6:
```
 14.3213 (  9.3%)   0.2375 (  0.6%)  14.5588 (  7.4%)  14.5539 (  7.4%) performance-unnecessary-value-param
  12.1474 (  4.4%)   0.3959 (  0.5%) 12.5433 (  3.6%)  12.5363 (  3.6%)  performance-unnecessary-value-param
 11.1302 (  4.3%)   0.3941 (  0.6%)  11.5243 (  3.5%)  11.5181 (  3.5%) performance-unnecessary-value-param
  11.0908 (  4.6%)   0.3859 (  0.6%) 11.4767 (  3.7%)  11.4680 (  3.7%)  performance-unnecessary-value-param
 10.9081 (  5.1%)   0.3449 (  0.6%)  11.2529 (  4.1%)  11.2460 (  4.1%) performance-unnecessary-value-param
  10.9071 (  4.0%)   0.3874 (  0.6%) 11.2945 (  3.3%)  11.2952 (  3.3%)  performance-unnecessary-value-param
 10.3415 (  3.9%)   0.4229 (  0.6%)  10.7644 (  3.2%)  10.9564 (  3.2%) performance-unnecessary-value-param
  10.0487 (  4.5%)   0.3539 (  0.6%) 10.4026 (  3.6%)  10.4265 (  3.6%)  performance-unnecessary-value-param
 9.8498 (  4.6%)   0.3350 (  0.6%)  10.1848 (  3.7%)  10.5083 (  3.8%) performance-unnecessary-value-param
   9.6022 (  4.4%)   0.3496 (  0.6%) 9.9518 (  3.6%)   9.9516 (  3.5%)  performance-unnecessary-value-param
 9.3159 (  4.5%)   0.3253 (  0.6%)   9.6412 (  3.7%)   9.6373 (  3.7%) performance-unnecessary-value-param
   9.1873 (  4.4%)   0.3463 (  0.6%) 9.5336 (  3.6%)   9.5281 (  3.6%)  performance-unnecessary-value-param
 9.0140 (  3.7%)   0.3728 (  0.6%)   9.3868 (  3.0%)   9.3801 (  3.0%) performance-unnecessary-value-param
   8.9893 (  4.0%)   0.3648 (  0.6%) 9.3541 (  3.3%)   9.3842 (  3.3%)  performance-unnecessary-value-param
 8.8615 (  3.9%)   0.3696 (  0.6%)   9.2311 (  3.2%)   9.3386 (  3.2%) performance-unnecessary-value-param
   8.6921 (  3.9%)   0.3637 (  0.6%) 9.0557 (  3.2%)   9.2582 (  3.0%)  performance-unnecessary-value-param
 8.5388 (  4.3%)   0.3112 (  0.6%)   8.8500 (  3.5%)   8.8450 (  3.5%) performance-unnecessary-value-param
   8.5110 (  3.8%)   0.3473 (  0.6%) 8.8582 (  3.1%)   8.8568 (  3.1%)  performance-unnecessary-value-param
 8.4446 (  4.0%)   0.3497 (  0.6%)   8.7943 (  3.2%)   8.7876 (  3.2%) performance-unnecessary-value-param
   8.3555 (  4.6%)   0.2681 (  0.5%) 8.6236 (  3.7%)   8.6190 (  3.7%) performance-unnecessary-value-param
```
As you can see the performance impact of the new version is really huge. Our jenkins job that previously (with clang-tidy 18) used to finish in about 2 hours, now (with clang 19) reached 8-hour timeout configured inside the job. After disabling this check, the job execution time went back to ~2 hours.

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to