My inclination would be none of the things that you listed. Your benchmarks sound about right for an optimizing compiler. However, often in a large application a 10x+ performance increase (or even much more) can be had by adjusting either the algorithm or the implementation coding of your existing algorithm.
Another factor to consider is that the higher you crank the compiler optimization level, the more chance there is of the compiler making a mistake. I've lost contact with a friend at the moment, but he was analyzing optimize levels in all the major C compilers as part of a PhD level paper. I learned that all of these things make mistakes if the code is complex enough - I'm sure that Perl itself is complex enough for that qualification. Since you are optimizing the compiled C code, some kind of flaw in what Perl does could be hard to track back - could be that some nasty thing happens that is very hard to figure out.
I personally would look for algorithmic and coding enhancements far before messing with compiling Perl itself at a higher optimization level.
In reply to Re: Compile perl for performance
by Marshall
in thread Compile perl for performance
by learnedbyerror
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |