in reply to Comparison effeciency
(Update should be !defined....)# Why was this line in the loop? It appears to be 'constant' # WRT to $j... # convert the binaries to decimals out here before we get into the loo +p... my @final_values = map { bintodec($_) } split(/[\s|\t]+/, $current_cas +e); my %hash; # just initialize these, but need no values... @hash{ @final_values } = (); my $not_found = 0; for $j (0..((2**$current_size) - 1)) { $not_found ||= !defined(%hash{ $j }); last if $not_found; } # $not_found will be 1 if at least one was missed...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Comparison effeciency
by flounder (Novice) on Apr 05, 2001 at 05:07 UTC | |
by Masem (Monsignor) on Apr 05, 2001 at 05:14 UTC |