in reply to Pair of items
Very rudimentary, but at the same time, this "unrolled" version is way faster than any list or hash based operation. Using a quick Benchmark test, it was 80% faster than other bits posted here.sub is_ok { $_[0][0] != $_[1][0] && $_[0][0] != $_[1][1] && $_[0][0] != $_[1][2] && $_[0][1] != $_[1][0] && $_[0][1] != $_[1][1] && $_[0][1] != $_[1][2] && $_[0][2] != $_[1][0] && $_[0][2] != $_[1][1] && $_[0][2] != $_[1][2]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re2: Pair of items
by dragonchild (Archbishop) on Jul 29, 2003 at 20:26 UTC | |
by tadman (Prior) on Jul 29, 2003 at 20:30 UTC |