An obvious improvement could be to sort your array first. So you can check each value on its neighbors only reducing the tests from N*N to N*M where M is the average population of clusters more 1.
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
In reply to Re: fastest way to compare numerical strings?
by psini
in thread fastest way to compare numerical strings?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |