Can you guarantee that the two "north" components are the same? I don't see why it wouldn't, but that would cut the number of comparisons by far. Maybe just make that a limitation of your routine, and die if the assertion fails.
-- Randal L. Schwartz, Perl hacker