Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Why is my program so slow even though I've used hashes?

by DStaal (Chaplain)
on May 28, 2009 at 18:33 UTC ( [id://766721]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Why is my program so slow even though I've used hashes?
in thread Why is my program so slow even though I've used hashes?

I'm of the opinion that the added understanding gained by profiling is worth it even in simple cases. At the point where you are trying to speed it up, even educated guessing is often wrong. And Devel::NYTProf (which I linked to above) does both line-level and block-level profiling, so it would directly say that the problem is that you are running these loops too often. (Leading the optimizer to start looking for ways to run them less, hopefully.)

When looking at profile output, there is a temptation to focus on individual lines I'll admit; but it can and does help just as much on a broader scale, as long as the programmer resists that temptation.

  • Comment on Re^3: Why is my program so slow even though I've used hashes?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-25 05:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found