XP is just a number | |
PerlMonks |
Compile perl for performanceby learnedbyerror (Monk) |
on Aug 14, 2018 at 14:55 UTC ( [id://1220325]=perlquestion: print w/replies, xml ) | Need Help?? |
learnedbyerror has asked for the wisdom of the Perl Monks concerning the following question: Oh so kind Monks Last night, I watched Graham TerMarsch's presentation "Red Wunz Go Fasta" from TPC 2018. It inspired me to go out and build perl 5.28.0 using perlbrew adding -D usemyalloc and -D optimize="-O3" flags. I have run a few benchmarks for one of my applications that munges through a large corpus of data files and builds several LMDB databases containing the parsed/analyzed information. The result is that I have shaved almost 25% of my runtime for this one program from per 5.26.2. This is running in a Debian Jessie LXC on a proxmox physical host running Debian Stretch In doing the above, I violated one of the cardinal rules of "Optimization Club" - make one change at a time. I changed both perl versions and two compiler flags. I promise to be more disciplined next time. My question to you oh so wise ones is - what options should I consider when trying to optimize against my specific code based? Some of those that come to mind are:
At this time, my platforms of interest are Linux and Macos. My current plan is to compare 5.26.2 to 5.28.0 only. I have done previous comparisons with earlier versions of perl and have seen significant performance increases from versions prior to 5.26.0. This is primarily due to the changes in hash generation as my applications tends to be hash heavy. I kindly request that those of you who may be inclined to inform me using intemperate language that this investigation is folly save your time and not try to convince a fool of his self-recognized folly I do greatly appreciate those who do offer up options. I will happily update this thread with my findings. Thank you in advance lbe
Back to
Seekers of Perl Wisdom
|
|