in reply to Re: Re: list of scalars vs arrays, speed?
in thread list of scalars vs arrays, speed?

He'd have to call timethis twice.

How, exactly, is that a problem?

  • Comment on Re: Re: Re: list of scalars vs arrays, speed?

Replies are listed 'Best First'.
Re: Re: Re: Re: list of scalars vs arrays, speed?
by belg4mit (Prior) on May 02, 2002 at 06:32 UTC
    Oh, it's not a problem. However the way you worded your response did not acutally convey that that was what you were suggesting. Taking your comment literally one might naively do:
    @base=qw/one two three four five six seven/; timethese(1_000_000,{ '@'=>sub{@s=@base;} '$'=>sub {($s1,$s2,$s3,$s4,$s5,$s6,$s7)=@base;}, });

    --
    perl -pew "s/\b;([mnst])/'$1/g"