http://www.perlmonks.org?node_id=962561


in reply to Print Vs Return In a Subroutine

You're micro-optimizing. Stop it.

Just make your code work, and when you think it woks too slow, benchmark the likely culprits and improve those, if necessary.

With Time::HiRes you can get the current time in microseconds, so you can measure quite precisely how long a piece of code takes.