in reply to Optimizing the bejeezus out of a sub
The first thing that jumped out when I looked over your code is the loop. It looks like something transcribed from C. Instead of
try doing something likefor(;@_;shift) { ... ... @_[0] ...
This plays to Perl's strengths (and saves you a few array subscripts). Or, if you want to be explicit,foreach ( @_ ) { ... ... $_ ...
foreach my $section ( @_ ) { ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Optimizing the bejeezus out of a sub
by diotalevi (Canon) on Jun 24, 2003 at 11:52 UTC | |
by sgifford (Prior) on Jun 24, 2003 at 16:23 UTC | |
by diotalevi (Canon) on Jun 24, 2003 at 16:35 UTC | |
by sgifford (Prior) on Jun 24, 2003 at 16:47 UTC | |
by diotalevi (Canon) on Jun 24, 2003 at 16:57 UTC | |
| |
|
Re: Re: Optimizing the bejeezus out of a sub
by sgifford (Prior) on Jun 24, 2003 at 07:38 UTC | |
by IlyaM (Parson) on Jun 24, 2003 at 08:55 UTC |