in reply to Re^2: Whats quicker - passing along as variable to sub, or global var?
in thread Whats quicker - passing along as variable to sub, or global var?

Devel::NYTProf, available on CPAN, is also your friend here. It does a wonderful job of showing where the time is going. If your subroutine is only a tiny fraction of the total time used, there's not much point in making it uglier to make it faster. If it is a major player, the profiler will point you to the parts that are worth tuning.

  • Comment on Re^3: Whats quicker - passing along as variable to sub, or global var?