I don't think that the number on the gauge matters.
What makes you so sure that exactly 40psi is optimum? Why not 45psi or 35psi? My thinking is the smart thing to do is to experimentally reduce air pressure until you start to get a rash of pinch flats or until you subjectively feel that "rolling resistance" has reached the unacceptable zone.
Whatever pressure number your pump says at that point is the right one. It's an analog thing.