Many people got confused with sharpness and depth of field. Deeper depth of field with smaller aperture means more portion of the image will be in focus but that does not means the image is sharper, just that the details are clearer delineated.
As a general guide, maybe you would want to use the lens from around 5.6 to 11 and not going more than 16 for best results, but it differs from lens to lens
That said, many lens perform badly when they're wide open (maximum aperture) since that's normally not their sweet spot.
There are some cases whereby a lens has to be "optimized" for a certain f-stop range.
E.g. - The ZM Sonnar f1.5 which is optimized for either f1.5 performance or f8 performance by the Zeiss factory. Hardcore lovers of this lens will get two copies, each optimized at different f-stops ;p I hear that the difference in sharpness can be quite alot, but i don't have one for myself to try :dunno: Therefore, higher f-stop, or even f8 f-stop is not alwys better.