remove compilation optimization flag

Jason Garber jg at jasongarber.com
Wed Feb 27 12:22:54 EST 2008


Gaspard:
Hey, wow!  You're my new favorite person.  I'd been commenting out  
nonessentials when I was working on something specific and just  
waiting the 10 minutes when I wanted to see the whole thing work.

I'm committing this change.  Johan, since you're the one who  
requested the -O1 flag, would you verify it still works for you in  
Leopard?

If anyone knows a reason it's bad to compile with -O0, now's the time  
to speak up.

Great work, Gaspard!  Thanks!

Jason

On Feb 27, 2008, at 1:32 AM, Gaspard Bucher wrote:

> top output (compilation took about 10 minutes)
>   # cc1          8.6%  5:13.31   1    13   365   730M+ 2.45M    
> 519M- 1.13G
>
> time to run all tests (3rd launch):
> real    0m2.713s
> user    0m1.321s
> sys     0m0.306s
>
> Without optimization flag (compilation takes 30 seconds):
> # cc1         84.0%  0:17.15   1    13   203   243M+ 4.42M   245M+   
> 435M+
>
> time to run all tests (3rd launch)
> real    0m2.560s
> user    0m1.323s
> sys     0m0.319s
>
> I think it would be a good change, especially when people compile this
> on a server with limited memory and shared CPU resources...
>
> PATCH:
> Index: ext/superredcloth_scan/extconf.rb
> ===================================================================
> --- ext/superredcloth_scan/extconf.rb	(revision 245)
> +++ ext/superredcloth_scan/extconf.rb	(working copy)
> @@ -1,9 +1,6 @@
>  require 'mkmf'
>
> -if /darwin9/ =~ RUBY_PLATFORM
> -  # OSX 10.5 doesn't like the default "-Os"
> -  $CFLAGS << " -O1 "
> -end
> +$CFLAGS << " -O0 " # do not optimize (takes too much memory and
> performance gain is negligeable)
>
>  dir_config("superredcloth_scan")
>  have_library("c", "main")
> _______________________________________________
> Redcloth-upwards mailing list
> Redcloth-upwards at rubyforge.org
> http://rubyforge.org/mailman/listinfo/redcloth-upwards



More information about the Redcloth-upwards mailing list