I'm not sure how much of a difference this *really* makes - I haven't done any serious benchmarks, though I saw no difference between -O2 vs -O3 when I tested a Ruby module.
Is there any reason NOT to put 'OPTIMIZE => "-O2"' for extensions in your Makefile.PL? All the gcc manual says is that it might make debugging more difficult and use more memory during the build phase. Not much of an issue for the majority of extensions out there, I don't think.
They're mostly the same (Score:2, Informative)
Also, optimizing interpreters is ery non-trivial, and they don't optimize nearly the same way as other, more straightforward, programs do, so the lack of noticeable difference isn't that surprising.
Re:They're mostly the same (Score:2)
Re:They're mostly the same (Score:1)
Which optimizations -O turns on for various optimization levels is potentially build and system dependent, just to add some fun into the mix. And, of course, GCC's optimizer gets slowly better over time, so even if the settings are identical you may get different runtimes depending on the version of GCC
Maybe (Score:1)
Ultimately, it's really a user choice though, and not something that should be embedded in a Makefile. If you want all your CPAN d
Its not MakeMaker, its you. (Score:2)
then it comes from whatever configuration hints are available for your OS. Most these days
use -O2 or -O3. Some, like OS X, choose -Os by default. Others (SCO, IRIX, AU/X) use -O to
play it safe.
And if you installed Perl from a vendor (Debian, Redhat, Sun, etc...) they could have changed the default, too.
Here's my stock p