No offense, but your compare() sub looks like it would be much slower than the OP's HoH solution. Since this is the sub that will be called millions of times, have you Benchmarked your assertion? Especially if the OP's compare() became return $lookup{$x}{$y}; since undef is implied.
Cheers - L~R
In reply to Re^2: Partial Order
by Limbic~Region
in thread Partial Order
by b4swine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |