Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
use Time::HiRes qw( clock );
my $clock0 = clock();
[your code here]
my $clock1 = clock();
my $clockd = $clock1 - $clock0;
my $time_it_took = time - $^T;
my $time_it_took = time - $^T;
lcs01 said:What is the unit of '$time_it_took'? Micro-second?
What's next?
I personally limit my efficiency testing to only mission critical functions, and of course to obviously time intensive IO operations like SQL statements.Coder: "Wow, I sped up this section of code 50%!"
Manager: "That's amazing! How long was it taking before?"
Coder: ".009ms! That's .004ms that we saved! I'm going to go through the entire codebase now and make this change everywhere!
Manager: uuuhhhhhhhh