which one will be the best compromised antenna for dx
a monoband gap antenna for 40 meters
or a 40 meter dipole up at 20 feet off the ground
A 40m dipole at 20' AGL is essentially an NVIS antenna, or 'cloud-burner'. Most of its signal will be directed upward, rather than outward. As others have noted - even an inefficient vertical will likely outperform a 20' AGL 40m dipole at the low launch angles that are typically required for long-haul DX.