Sharpness falls on extremely small aperture, on the compact cameras in the worst case occurring spikes.
Look for this part of the text on the link at the end of my post:
"This should not lead you to think that "larger apertures are better," even though very small apertures create a soft image; most lenses are also quite soft when used wide open (at the largest aperture available). Camera systems typically have an optimal aperture in between the largest and smallest settings; with most lenses, optimal sharpness is often close to the diffraction limit, but with some lenses this may even occur prior to the diffraction limit. These calculations only show when diffraction becomes significant, not necessarily the location of optimum sharpness (see camera lens quality: MTF, resolution & contrast for more on this)."