This question already has an answer here:
When logging in to my PC, and the password is correct, the login takes place nearly instantaneously. When the password is wrong, it takes a few seconds of waiting until the hint "The password is not correct." shows up.
The same thing happens on the terminal with
sudo. But why?
I am pretty sure that the passwords hashes are saved and get compared to the hashes of entered passwords. But wouldn't it take longer to confirm the hashes are identical?