in reply to Compile perl for performance
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Compile perl for performance
by learnedbyerror (Monk) on Aug 15, 2018 at 00:19 UTC | |
by Marshall (Canon) on Aug 16, 2018 at 17:48 UTC | |
by learnedbyerror (Monk) on Aug 17, 2018 at 04:26 UTC | |
by Marshall (Canon) on Aug 19, 2018 at 18:39 UTC |