in reply to Re^2: random #s
in thread random #s

I can't easily read that because you can't be bothered to use code tags around your code. However you might look up the difference between cmp and <=>.

Premature optimization is the root of all job security