The smallest handgun I target shoot with is a Glock 27. If a person was stupid enough to stand still and let me shoot at them, I'd hit them 25 yards away.
The smallest handgun I've shot is a KelTec P3AT which is a .380 pocket pistol. It worked just fine at five yards. i didn't try to get any further away than that. It didn't seem to be intended for use much beyond that.