![]() |
|
P is for Practical | |
PerlMonks |
Re: Zipcode Proximity scriptby CountZero (Bishop) |
on Mar 31, 2003 at 19:50 UTC ( #247049=note: print w/replies, xml ) | Need Help?? |
A simple trick to cut time in half is to check only for places which are further down the file, as the distance from A to B is the same as the distance from B to A. After you have found all A to B distances, just invert the list to get all B to A distances as well. CountZero "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In Section
Seekers of Perl Wisdom
|
|