in reply to Re: Re: Re: Re: Re: to strict or not to strict
in thread to strict or not to strict
What did you run it on out of interest?
233MHz P-II.
On the Benchmark side the BEGIN case have identical (and much faster results) because Perl only executes them once and then effectively does a NOP on that code section. At least that is what I suspect....
Given that the BEGIN{}s are wrapped in strings, the won't actually be seen by the compiler until eval time, which would mean that they are re-compiled each time the benchmark is iterated. Unless Benchmark wraps string code arguements in a subroutine wrapper and takes a coderef to the compiled code and invokes it via that for the second and subsequent runs, which is a possibility. I'll try to confirm or deny that.
|
|---|