1 |
Pacho Ramos <pacho@g.o> wrote: |
2 |
> |
3 |
> Is there any kind of information about performance penalty of |
4 |
> -fstack-protector? I have googled some time and there are various |
5 |
> estimations (from ~2 to ~8%), but I have no idea what have they checked |
6 |
> exactly. |
7 |
|
8 |
This depends extremely on the code: Most functions will be unchanged, |
9 |
and only a few functions with possibly dangerous code get a fixed |
10 |
impact whenever they are called. Whether they are called frequently |
11 |
or not cannot be said in general. |
12 |
|
13 |
> looks to me like it will have impact but "not too much" :/ |
14 |
|
15 |
Of course, it will have impact, but it is more theoretical than practical. |
16 |
|
17 |
> For some recent computers I would probably use it, |
18 |
> but for older ones, I am not sure if will be happy |
19 |
> with that additional impact :| |
20 |
|
21 |
On my old Pentium III laptop it makes no difference for my applications |
22 |
which can be felt. Of course, if you have a special time-critical |
23 |
application which just was on the limit, things might be different. |
24 |
However,in such cases you would also use things like -DNDEBUG which one |
25 |
would not choose as a default just because it gives some minimal |
26 |
performance enhancement. |