Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: code optimization

by Anonymous Monk
on Nov 04, 2011 at 01:39 UTC ( #935813=note: print w/ replies, xml ) Need Help??


in reply to Re: code optimization
in thread code optimization

I always roll my own benchmark. I dont trust benchmarking perl modules.

Why?


Comment on Re^2: code optimization
Re^3: code optimization
by patcat88 (Deacon) on Nov 04, 2011 at 14:50 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.

      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://935813]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2014-09-19 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (137 votes), past polls