The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm doing some research on how I can optimize our Perl application. It's fairly large (100k lines). I've ran both dprof and NYTimes to try and fix some of the outliers, but we think that there are some things we're not seeing (based on the output).
If anyone can comment on the following, we'd greatly appreciate it. First, some background: Our application is separated into many libraries (almost 1k) and within those libraries, many many methods (over 3k total). 1. We found this: http://www.perl.com/pub/a/2000/06/dougpatch.html ... (we realize this is very old, and things have probably changed, but I'd better ask)... We're worried that method call overhead isn't taken into account in any of our profiling runs. I couldn't find any resolution to this thread either. If anything, we'd gladly take a pragma to lock in inheritance to get the performance boost. We call a LOT of methods in our system, if we can make calling them faster, it would make a difference. 2. We're using "fields", since we desperately need compile time safety for attribute lookups, and I'm told that it's faster than using a hash directly, because they become array lookups. We're researching the move to Perl 5.10 as well, because of a purported speed boost as well as a decreased memory footprint. Lastly, we heard that there is a change to fields past 5.9, and 5.10 has a "new" way of doing this type of stuff altogether, but I haven't seen any benchmarks or documentation detailing the implementations and any rationale for using/not using them. 3. We use SWIG to talk to shared memory. Does anyone have any idea the difference in performance between hand rolling XS over SWIG for reading attributes off a C Structure? (or is there some even "better" way to do this kind of thing that I've never heard of?) 4. I read the section of perldoc concerning inline functions. I'm a little confused, you can't have an inline function if it has any arguments? I need to run some benchmarks of my own on this, but it's not something I see mentioned in any of my Perl books. (Is memoization of a method call even possible?) Update: The dprofpp -r produced some interesting results (1.5 hours of data collected).
Based on this, we definitely have some more work to do. Thanks to everyone with their insight on the issue. In reply to Optimizing a large project. by dextius
|
|