dupemerge: maybe improve seek performance by sorting perl hashes
Thank Johannes Niess <Linux@johannes-niess.de> for this idea.
To improve seek performance, choose inodes for linking in a fixed order.
This will mean that two directories with multiple identical files will
end up with links to the copies with lower inode numbers. This is an
improvement over the previous result, which was that both directories
would end up with randomly chosen files from both directories.
The sort order isn't strictly numeric; however, it's hopefully close
enough.
As a crude heuristic, we assume that inode numbers approximate file
position on disk, and file names approximate typical usage patterns.
Previously we used the perl hash semantics, which are mostly random
and might change depending on the numbers of files considered.