How can I speed up my Perl program?

Please remember the rules of Optimization Club:

  1. The first rule of Optimization Club
    is, you do not Optimize.
  2. The second rule of Optimization Club is, you do not Optimize without measuring.
  3. If your app is running faster than the underlying transport protocol, the optimization is over.
  4. One factor at a time.
  5. No marketroids, no marketroid schedules.
  6. Testing will go on as long as it has to.
  7. If this is your first night at Optimization Club, you have to write a test case.

So, assuming you actually have working code, run your program under Devel::NYTProf.

Find the bottlenecks. Then come back here to tell us what they are.

If you don’t have working code, get it working first. The single biggest optimization you will ever make is going from non-working to working.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)