in reply to Re: Getting a list of aliases to selected items from a list of array references
in thread Getting a list of aliases to selected items from a list of array references
Sort of combining this idea with my idea, I could unroll the loop, perhaps reducing the performance penalty (or perhaps not):
my $aPush= sub { \@_ }; my $av= []; while( 9 < @_ ) { $av= $aPush->( @$av, $_[0][0], $_[1][0], $_[2][0], $_[3][0], $_[4][0], $_[5][0], $_[6][0], $_[7][0], $_[8][0], $_[9][0] + ); splice @_, 0, 10; } while( 2 < @_ ) { $av= $aPush->( @$av, $_[0][0], $_[1][0], $_[2][0] ); splice @_, 0, 3; } $av= $aPush->( @$av, $_->[0] ) for @_;
or combine more of your idea in but still not need string eval...
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^2: Getting a list of aliases to selected items from a list of array references (unroll)
by antirice (Priest) on May 18, 2004 at 13:27 UTC |