Help me with speed up this script

hey guys i have a perl script wich use to compare hashes but it tookes a long time to do that so i wich i will have the soulition to do it soo fast

he is the code

<redacted>

Moderator comments were removed during original forum migration.