I used to think it was more, but in fact, -fno-stack-protector probably saves
less than 1% of execution time.  The stack clearing of the MBARI patches
invokes alloca often, so any extra overhead there will be felt more than
without stack clearing.

Note also that the stack-protector stuff was added to gcc to
detect malicious attempts to hack the stack in 'C' code that processes
networking data.  Ruby's stack cannot be hacked that way as all
array indecies are checked explicitly.  So, in Ruby, gcc's
stack-protector is sort of like wearing a belt and suspenders.

- brent


Roger Pack wrote:
> 
>> I'm building like this:
>> $  CFLAGS="-O2 -fno-stack-protector" configure --prefix=$HOME/ruby/test
>> $ make -j3 && make install
> 
> Question:
> does the -fno-stack-protector stuff make much of a speed difference?
> Thanks!
> -=r
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-ruby-core%3A19846---Bug--744--memory-leak-in-callcc--tp20447794p22086518.html
Sent from the ruby-core mailing list archive at Nabble.com.