Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: code optimization

by patcat88 (Deacon)
on Nov 04, 2011 at 14:50 UTC ( #935949=note: print w/ replies, xml ) Need Help??


in reply to Re^2: code optimization
in thread code optimization

Profilers can lead to false optimizations because your measuring the overhead of recording the timings (OS interrupts/OS calls/context switches/mutex hits/evals/method resolution) or 1 run if the func is below the OS timer resolution. I took nytprof to these subs and nytprof changed which is the fastest sub which is no good.


Comment on Re^3: code optimization
Re^4: code optimization
by Anonymous Monk on Nov 05, 2011 at 00:13 UTC

    Profilers can lead to false optimizations because your measuring the overhead of recording the timings (OS interrupts/OS calls/context switches/mutex hits/evals/method resolution) or 1 run if the func is below the OS timer resolution. I took nytprof to these subs and nytprof changed which is the fastest sub which is no good.

    Well, Benchmark isn't exactly a profiler, and reinventing Benchmark seems like a particularly pedestrian thing to reinvent, and the overhead is accounted for

    But, regarding NYTProf, I don't get the argument, its not as if it is Benchmark :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://935949]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (14)
As of 2015-07-07 14:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (90 votes), past polls