daniel-petrovic wrote:
hey guys, just for supporting discussion, I've run some benchmark with
`hyperfine` between main and patched branch for different template depths
(only did it for debug build, my machine is a bit slow):
The command used:
```
hyperfine --warmup 5 --runs 20 \
--export-markdown "$TEST_DIR/results_depth_${DEPTH}.md" \
"$CLANG_ROOT/bin/clang -std=c++20 -fsyntax-only -xc++ $FILE" \
"$CLANG_ROOT/bin_main/clang -std=c++20 -fsyntax-only -xc++ $FILE"
echo ""
```
Files look like: `template<typename T> struct S {};
using Trigger = S<S<S<S<S<S<S<S<S<S<int>>>>>>>>>>;
`
with different template depths (10, 100, 500, 1000)
The output (times are ms):
| Template Depth | Build | Mean | Min | Max | Relative |
| :--- | :--- | :--- | :--- | :--- | :--- |
| 10 | `patch` | 28.2 ± 4.7 | 20.6 | 35.1 | 1.27 ± 0.23 |
| 10 | `main` | 22.1 ± 1.4 | 20.8 | 25.8 | 1.00 |
| 100 | `patch` | 29.1 ± 2.2 | 26.8 | 33.4 | 1.00 |
| 100 | `main` | 30.0 ± 1.3 | 27.8 | 32.4 | 1.03 ± 0.09 |
| 500 | `patch` | 54.6 ± 2.1 | 51.9 | 59.7 | 1.03 ± 0.05 |
| 500 | `main` | 52.9 ± 1.7 | 50.5 | 56.6 | 1.00 |
| 1000 | `patch` | 85.2 ± 2.4 | 82.1 | 90.2 | 1.02 ± 0.04 |
| 1000 | `main` | 83.9 ± 1.8 | 81.0 | 87.0 | 1.00 |
Hope this helps a bit getting some better filling about timing.
https://github.com/llvm/llvm-project/pull/224393
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits