Issue 183832
Summary [libc++] std::search_n benchmark for "no match" gets constant folded by optimizer?
Labels libc++, test-suite, performance
Assignees philnik777
Reporter ldionne
    I think the std::search_n benchmark for the "no match" variant, when run with `std::vector`, gets constant folded. I stumbled upon that by looking at the commit description for #171389, which reports:

```
std::search_n(list<int>,_pred)_(no_match)/8192 8658.99         8825.71        166.72 1.93%
std::search_n(vector<int>)_(no_match)/1000                   210.36 3.47       -206.89 -98.35%
std::search_n(vector<int>)_(no_match)/1024                   217.60 4.13       -213.47 -98.10%
std::search_n(vector<int>)_(no_match)/1048576             209386.43 3.51    -209382.92 -100.00%
std::search_n(vector<int>)_(no_match)/8192                  1643.79 3.50      -1640.29 -99.79%
std::search_n(vector<int>,_pred)_(no_match)/1000             460.88 5.44       -455.45 -98.82%
std::search_n(vector<int>,_pred)_(no_match)/1024             475.36 5.43       -469.93 -98.86%
std::search_n(vector<int>,_pred)_(no_match)/1048576       682722.75 7.15    -682715.60 -100.00%
std::search_n(vector<int>,_pred)_(no_match)/8192            3779.95 5.43      -3774.52         -99.86%
Geomean 4956.15           87.96      -4868.19 -98.23%
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to