In newer versions of macOS, the Dock’s auto-hide behavior has become noticeably sluggish. Fortunately, you can speed things up using a couple of hidden settings via the command line.
Speed up Dock animation
This removes the animation delay when the Dock appears or disappears:
defaults write com.apple.dock autohide-time-modifier -int 0; killall Dock
Remove the delay before the Dock appears
This makes the Dock show instantly when you hover near the edge:
defaults write com.apple.dock autohide-delay -float 0; killall Dock
Revert to default behavior
If you want to undo the changes and go back to the default behavior:
defaults delete com.apple.dock autohide-time-modifier
defaults delete com.apple.dock autohide-delay
killall Dock