ssinyagin/torrus-newfeatures — comment on commit dac9229db3400c8721fbe769f27b94c8c89b3d17
File:  line 0
By djzort:

there is a lot of jitter in this test when run like that, observe
subsequent runs of the same double quoted test.

dean@soundwave:~/git/torrus-newfeatures/src$ time perl -e '$a=""; for $b
(1..10000000) {$a .=$b}; print ($a eq "" )'

real	0m1.384s
user	0m1.340s
sys	0m0.044s
dean@soundwave:~/git/torrus-newfeatures/src$ time perl -e '$a=""; for $b
(1..10000000) {$a .=$b}; print ($a eq "" )'

real	0m1.432s
user	0m1.372s
sys	0m0.056s
dean@soundwave:~/git/torrus-newfeatures/src$ time perl -e '$a=""; for $b
(1..10000000) {$a .=$b}; print ($a eq "" )'

real	0m1.393s
user	0m1.328s
sys	0m0.060s
dean@soundwave:~/git/torrus-newfeatures/src$ time perl -e '$a=""; for $b
(1..10000000) {$a .=$b}; print ($a eq "" )'

real	0m1.388s
user	0m1.356s
sys	0m0.028s
dean@soundwave:~/git/torrus-newfeatures/src$

FYI perlcritic will also complain about double quoted strings with
nothing to interpolate within them, and will also complain about ''
asking you to use q|| or q() as they are more clear to the reader and
less likely to be overlooked

youre welcome to disagree with perlcritic, if you do i dont care to talk
about it

On 02/11/11 07:59, Stanislav Sinyagin wrote:
> time perl -e '$a=""; for $b (1..10000000) {$a .=$b}; print ($a eq "" )'
>

--
http://fragfest.com.au