Example 64 Detecting potential performance improvement opportunities
struct X{ int i;
int arr[100]; } x;
int foo( struct X);
int main() {
foo (x); //line 16
}
$ cadvise +wperfadvice aCC
"/example.c", line 16: warning
large (404 bytes) parameter by value is inefficient, consider passing by reference
foo (x);
^
8.7 Detecting potential performance improvement opportunities | 55 |