That would work if I really wanted to establish it definitively over many iterations, but it also winds up including the system dispatch and perl's own startup time, which may or may not be relevant for a particular use-case.
In this instance, I actually wanted it more in passing as I compile and run things during testing.
As a side note, it's probably a bit more robust across platforms to do this:
system( $^X, '-c', shift )
Even more robust would be to use Probe::Perl instead of $^X.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re^2: How to measure compilation time?
by xdg
in thread How to measure compilation time?
by xdg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |