Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • by Elian (119) on 2003.03.31 16:51 (#18566) Homepage Journal
    -O is "default optimization level", which may be -O1, -O2, or -O3, depending on how GCC's set up.

    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.
    • I'm confused then (bear with me - it happens often). According to the gcc docs, "-O" is its own option, separate from "-O0", which is the (factory) default setting. But then, I can't seem to figure out how to tell what the default optimization level is in the first place (assuming it's been changed from -O0).
      • You can check the installed man page for gcc and hope it's up to date. For OS X, -O and -O1 are the same, and it looks the same for my linux box, though whether that's true or not is something else entirely.

        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