I think what one clearly wants is for rpm to maintain an installed file indexed keyed by md5sum. Then you can have a tool that just uses this database to identify duplicates (and doesn't take forever), or have rpm do so itself when installing new files.