in reply to Re: Unpacking and converting
in thread Unpacking and converting
I recommend to try
cmpthese -1,{ c => q[ my @c = '0001' .. '1000'; $c[ $_ ] += 0 for 0 .. $#c; ], a => q[ my @a = '0001' .. '1000'; $_ += 0 for @a; ], b => q[ my @b = '0001' .. '1000'; my @new; push @new, $_ + 0 while + defined( $_ = shift @b ) ], };
Then the results are appropriate
Rate b c a b 999/s -- -22% -28% c 1279/s 28% -- -7% a 1382/s 38% 8% --
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Unpacking and converting
by dwalin (Monk) on Feb 16, 2011 at 09:14 UTC | |
by andal (Hermit) on Feb 16, 2011 at 10:39 UTC | |
by BrowserUk (Patriarch) on Feb 16, 2011 at 15:51 UTC | |
by dwalin (Monk) on Feb 16, 2011 at 14:01 UTC | |
by Anonyrnous Monk (Hermit) on Feb 16, 2011 at 10:26 UTC |