macro_rules! perf { ($n:expr, $label:expr, $code:block) => { ... }; }
Expand description
Simple benchmark tool for runtime measure of a code block.
For the given block code, it adds up total time during LOOPS
-time run
and then print and return the total time.
When LOOPS
is 0, it only runs once without STDOUT
.