in reply to Re^2: cannot get Benchmark to work
in thread cannot get Benchmark to work
Because if you pass it a code reference, your benchmark needs to call a subroutine on each iteration. If you run your benchmark 10000 times, you will be calling 10000 subroutines, that is, you create 10000 blocks, and break them down 10000 times (think ref counting overhead), all which have nothing to do with the thing you are benchmarking.a code reference will show a slightly slower execution time than the equivalent eval'd stringI only wonder... why?
|
|---|