We calculate error rates, and their effects on imaging speed and resolution, in techniques that overcome the diffraction limit by using switchable fluorescent molecules. Recent experimental work has beaten the diffraction limit in fluorescence microcopy by activating and localizing subsets of the fluorescent molecules in the specimen, and repeating this process until all of the molecules have been imaged. Examples include PhotoActivation Localization Microscopy (PALM), STOchastic Reconstruction Microscopy (STORM), and microscopy of blinking quantum dots. In all these techniques there is a tradeoff between speed (activating more molecules per imaging cycle) and error rates (activating nearby molecules and producing overlapping images that hide information on molecular positions), and so intelligent image-processing approaches are needed to identify and reject bright spots containing multiple molecules. We show that there is a maximum acquisition rate determined by this trade-off, and that how closely one can approach this acquisition rate depends on the capabilities of the algorithm used to distinguish single-molecule spots from multi-molecule spots. In particular, we calculate the error rates of commonly-used algorithms that use the shape of the bright spot rather than the overall intensity. This technique is used in STORM because fluorescent dyes have fluorescence efficiencies that can be strongly affected by the local environment. We show that the capabilities of these algorithms, in combination with the target contrast between fluorophores and background, determine whether the resolution is limited by the capabilities of the algorithm or the number of photons collected, leading to photon-limited and algorithm-limited resolution regimes. Finally, we consider algorithms that can infer molecular positions from images of overlapping blurs, and derive the dependence of the minimimum acquisition time on algorithm performance for this class of algorithms.