The most common detector configuration for Shack Hartmann (SH) wavefront sensors used for adaptive optics (AO) wavefront sensing is the quad cell. Advances in detectors, such as the CCDs being developed in a project on which we are collaborators (funded by the Adaptive Optics Development Program), make it possible to use larger pixel arrays. The CCD designs incorporate improved read amplifiers and novel pixel geometries optimized for laser guide star (LGS) AO wavefront sensing. While it is likely that finer sampling of the SH spot will improve the ability of the wavefront sensor to accurately determine the spot displacement, particularly for elongated or aberrated spots such as those seen in LGS AO systems, the optimal sampling is not dependent simply on the number of pixels but must also take into account the effects of photon and detector noise. The performance of a SH wavefront sensor also depends on the performance of the algorithm used to find the spot displacement. In the literature alternatives have been proposed to the common center of mass algorithm, but these have not been simulated in detail. In this paper we will describe the results of our study of the performance of a SH wavefront sensor with a well sampled spot. We will present results for simulations of the wavefront sensor that enable us to optimize the design of the detector for varying conditions of signal to noise and spot elongation. We will also discuss the application of correlation algorithms to SH wavefront sensors and present results regarding the performance and statistics of this algorithm.© (2006) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.