in reply to Re: Making program readable
in thread Making program readable
I replaced the my if-else loops with these.
my @del_user_error_count; foreach my $i (0..4) { if ($cdr_post_array[11] eq $del_user_errors[$i]) { $del_user_error_count[$i]++; last; } }
Its decreased 42 lines but its increasing the execution time. I see this through benchmark.
For if-else loop it gives
the code took:52 wallclock secsAfter replacing the code with foreach
the code took:67 wallclock secs
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Making program readable
by karlgoethebier (Abbot) on Oct 09, 2015 at 20:43 UTC | |
|
Re^3: Making program readable
by Anonymous Monk on Oct 07, 2015 at 01:43 UTC |